Class: Cryptoform::EncryptionBackends::Lockbox
- Inherits:
-
Backend
- Object
- Backend
- Cryptoform::EncryptionBackends::Lockbox
- Defined in:
- lib/cryptoform/encryption_backends/lockbox.rb
Direct Known Subclasses
Instance Method Summary collapse
Instance Method Details
#decrypt(ciphertext) ⇒ Object
8 9 10 |
# File 'lib/cryptoform/encryption_backends/lockbox.rb', line 8 def decrypt(ciphertext) JSON.parse(lockbox.decrypt(ciphertext), symbolize_names: true) end |
#encrypt(object) ⇒ Object
4 5 6 |
# File 'lib/cryptoform/encryption_backends/lockbox.rb', line 4 def encrypt(object) lockbox.encrypt(object.to_json) end |
#generate_key ⇒ Object
12 13 14 |
# File 'lib/cryptoform/encryption_backends/lockbox.rb', line 12 def generate_key ::Lockbox.generate_key end |