Sha256: 209ea4aaf7a676da82f3b5657c9d10d7fb1e4dbacc9398addab9011a2f49929d
Contents?: true
Size: 900 Bytes
Versions: 1
Compression:
Stored size: 900 Bytes
Contents
# 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
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
encrypted-keystore-0.0.4 | Readme.md |