Class: String

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

Instance Method Summary collapse

Instance Method Details

#to_the_decryptedObject



20
21
22
23
# File 'lib/the_encrypted_string.rb', line 20

def to_the_decrypted
  encrypted_str = Base64.urlsafe_decode64(self)
  Encryptor.decrypt encrypted_str
end

#to_the_encryptedObject



15
16
17
18
# File 'lib/the_encrypted_string.rb', line 15

def to_the_encrypted
  encrypted_str = Encryptor.encrypt(self)
  Base64.urlsafe_encode64 encrypted_str
end