Class: QuoVadis::EncryptedType

Inherits:
ActiveRecord::Type::Value
  • Object
show all
Defined in:
lib/quo_vadis/encrypted_type.rb

Instance Method Summary collapse

Instance Method Details

#deserialize(value) ⇒ Object



6
7
8
# File 'lib/quo_vadis/encrypted_type.rb', line 6

def deserialize(value)
  Crypt.decrypt(value)
end

#serialize(value) ⇒ Object



10
11
12
# File 'lib/quo_vadis/encrypted_type.rb', line 10

def serialize(value)
  Crypt.encrypt(value)
end