Class: CryptKeeper::Provider::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/crypt_keeper/provider/base.rb

Direct Known Subclasses

ActiveSupport, MysqlAesNew, PostgresBase

Instance Method Summary collapse

Instance Method Details

#dump(value) ⇒ Object


4
5
6
7
8
9
10
# File 'lib/crypt_keeper/provider/base.rb', line 4

def dump(value)
  if value.blank? || CryptKeeper.stub_encryption?
    value
  else
    encrypt(value.to_s)
  end
end

#load(value) ⇒ Object


12
13
14
15
16
17
18
# File 'lib/crypt_keeper/provider/base.rb', line 12

def load(value)
  if value.blank? || CryptKeeper.stub_encryption?
    value
  else
    decrypt(value)
  end
end