Sha256: d3dbf3177c3fb4e4b3db3b561b69a734cf091651ef70561ba8ba578e654983ee
Contents?: true
Size: 1017 Bytes
Versions: 2
Compression:
Stored size: 1017 Bytes
Contents
# Encrypted Keystore [![Gem Version](https://img.shields.io/gem/v/encrypted-keystore.svg)](https://rubygems.org/gems/encrypted-keystore) A simple encrypted key storage system. ## Installation Add this to your Gemfile: ```ruby gem 'encrypted-keystore' ``` or install directly: ```bash gem install encrypted-keystore ``` ## Inclusion In `config/application.rb`, include the following: ```ruby require 'encrypted_keystore' ``` ## Usage ### Direct Construction Encrypt: ```ruby ek = EncryptedKeystore.new( file: 'path/to/key.pem', out: 'path/to/encrypted.pem.enc' ) ek.encrypt key = ek.key iv = ek.iv ``` Decrypt: ```ruby ek = EncryptedKeystore.new( file: 'path/to/encrypted.pem.enc', out: 'path/to/key.pem', key: key, iv: iv ) ek.decrypt ``` ### Class Methods ```ruby key_hash = EncryptedKeystore.encrypt( file: 'path/to/key.pem', out: 'path/to/encrypted.pem.enc' ) EncryptedKeystore.decrypt( file: 'path/to/encrypted.pem.enc', out: 'path/to/key.pem', key: key, iv: iv ) ```
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
encrypted-keystore-0.0.6 | Readme.md |
encrypted-keystore-0.0.5 | Readme.md |