module Cryptor::EncryptedAttribute
Support for the attr_encrypted encryptor API
Public Instance Methods
symmetric_cryptor(options)
click to toggle source
# File lib/cryptor/encrypted_attribute.rb, line 14 def symmetric_cryptor(options) Cryptor::SymmetricEncryption.new(options[:key], keyring: options[:keyring]) end
symmetric_decrypt(options)
click to toggle source
# File lib/cryptor/encrypted_attribute.rb, line 10 def symmetric_decrypt(options) symmetric_cryptor(options).decrypt(options[:value]) end
symmetric_encrypt(options)
click to toggle source
# File lib/cryptor/encrypted_attribute.rb, line 6 def symmetric_encrypt(options) symmetric_cryptor(options).encrypt(options[:value]) end