Class: EncryptAttributes::Encryptor
- Inherits:
-
Object
- Object
- EncryptAttributes::Encryptor
- Defined in:
- lib/encrypt_attributes/encryptor.rb
Instance Method Summary collapse
Instance Method Details
#decrypt(value) ⇒ Object
18 19 20 21 |
# File 'lib/encrypt_attributes/encryptor.rb', line 18 def decrypt(value) return value if value.to_s.empty? .decrypt_and_verify(value) end |
#encrypt(value) ⇒ Object
13 14 15 16 |
# File 'lib/encrypt_attributes/encryptor.rb', line 13 def encrypt(value) return value if value.to_s.empty? .encrypt_and_sign(value) end |
#message_encryptor ⇒ Object
23 24 25 |
# File 'lib/encrypt_attributes/encryptor.rb', line 23 def ActiveSupport::MessageEncryptor.new(self.class.secret) end |