Class: HashedAttr::Encryptor

Inherits:
Object
  • Object
show all
Defined in:
lib/hashed_attr/encryptor.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.decrypt(value) ⇒ Object



9
10
11
# File 'lib/hashed_attr/encryptor.rb', line 9

def self.decrypt(value)
  new().decrypt(value)
end

.encrypt(value) ⇒ Object



5
6
7
# File 'lib/hashed_attr/encryptor.rb', line 5

def self.encrypt(value)
  new().encrypt(value)
end

Instance Method Details

#decrypt(value) ⇒ Object



17
18
19
# File 'lib/hashed_attr/encryptor.rb', line 17

def decrypt(value)
  value
end

#encrypt(value) ⇒ Object



13
14
15
# File 'lib/hashed_attr/encryptor.rb', line 13

def encrypt(value)
  Digest::SHA512.base64digest value
end