Module: Cryptor::EncryptedAttribute
- Defined in:
- lib/cryptor/encrypted_attribute.rb
Overview
Support for the attr_encrypted encryptor API
Class Method Summary collapse
- .symmetric_cryptor(options) ⇒ Object
- .symmetric_decrypt(options) ⇒ Object
- .symmetric_encrypt(options) ⇒ Object
Class Method Details
.symmetric_cryptor(options) ⇒ Object
14 15 16 |
# File 'lib/cryptor/encrypted_attribute.rb', line 14 def symmetric_cryptor() Cryptor::SymmetricEncryption.new([:key], keyring: [:keyring]) end |
.symmetric_decrypt(options) ⇒ Object
10 11 12 |
# File 'lib/cryptor/encrypted_attribute.rb', line 10 def symmetric_decrypt() symmetric_cryptor().decrypt([:value]) end |
.symmetric_encrypt(options) ⇒ Object
6 7 8 |
# File 'lib/cryptor/encrypted_attribute.rb', line 6 def symmetric_encrypt() symmetric_cryptor().encrypt([:value]) end |