Class: ActiveRecord::Encryption::NullEncryptor

Inherits:
Object
  • Object
show all
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

Instance Method Details

#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

Returns:

  • (Boolean)


16
17
18
# File 'lib/active_record/encryption/null_encryptor.rb', line 16

def encrypted?(text)
  false
end