Class: ActiveRecord::Encryption::NullEncryptor
- Inherits:
-
Object
- Object
- ActiveRecord::Encryption::NullEncryptor
- Defined in:
- lib/active_record/encryption/null_encryptor.rb
Overview
An encryptor that won’t decrypt or encrypt. It will just return the passed values
Instance Method Summary collapse
- #binary? ⇒ Boolean
- #decrypt(encrypted_text, key_provider: nil, cipher_options: {}) ⇒ Object
- #encrypt(clean_text, key_provider: nil, cipher_options: {}) ⇒ Object
- #encrypted?(text) ⇒ Boolean
Instance Method Details
#binary? ⇒ Boolean
20 21 22 |
# File 'lib/active_record/encryption/null_encryptor.rb', line 20 def binary? false end |
#decrypt(encrypted_text, key_provider: nil, cipher_options: {}) ⇒ Object
12 13 14 |
# File 'lib/active_record/encryption/null_encryptor.rb', line 12 def decrypt(encrypted_text, key_provider: nil, cipher_options: {}) encrypted_text end |
#encrypt(clean_text, key_provider: nil, cipher_options: {}) ⇒ Object
8 9 10 |
# File 'lib/active_record/encryption/null_encryptor.rb', line 8 def encrypt(clean_text, key_provider: nil, cipher_options: {}) clean_text end |
#encrypted?(text) ⇒ Boolean
16 17 18 |
# File 'lib/active_record/encryption/null_encryptor.rb', line 16 def encrypted?(text) false end |