Class: SimpleEncryptable::Encryptor
- Inherits:
-
Object
- Object
- SimpleEncryptable::Encryptor
- Defined in:
- lib/simple_encryptable/encryptor.rb
Class Method Summary collapse
Class Method Details
.decrypt(value, options) ⇒ Object
14 15 16 17 |
# File 'lib/simple_encryptable/encryptor.rb', line 14 def decrypt(value, ) key = key() ActiveSupport::MessageEncryptor.new(key).decrypt_and_verify(value) end |
.encrypt(value, options) ⇒ Object
9 10 11 12 |
# File 'lib/simple_encryptable/encryptor.rb', line 9 def encrypt(value, ) key = key() ActiveSupport::MessageEncryptor.new(key).encrypt_and_sign(value) end |