Class: Captchah::Encryptor

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

Class Method Summary collapse

Class Method Details

.decrypt(value) ⇒ Object



10
11
12
# File 'lib/captchah/encryptor.rb', line 10

def decrypt(value)
  encryptor.decrypt_and_verify(Base64.strict_decode64(value))
end

.encrypt(value) ⇒ Object



6
7
8
# File 'lib/captchah/encryptor.rb', line 6

def encrypt(value)
  Base64.strict_encode64(encryptor.encrypt_and_sign(value))
end