Module: Garcon::Crypto::String
- Defined in:
- lib/garcon/utility/crypto.rb
Overview
Adds ‘encrypt` and `decrypt` methods to strings.
Instance Method Summary collapse
-
#decrypt(password = nil, salt = nil) ⇒ Object
Returns a new string containing the decrypted version of itself.
-
#encrypt(password = nil, salt = nil) ⇒ Object
Returns a new string containing the encrypted version of itself.
Instance Method Details
#decrypt(password = nil, salt = nil) ⇒ Object
Returns a new string containing the decrypted version of itself
97 98 99 |
# File 'lib/garcon/utility/crypto.rb', line 97 def decrypt(password = nil, salt = nil) Garcon::Crypto.decrypt(self, password, salt) end |
#encrypt(password = nil, salt = nil) ⇒ Object
Returns a new string containing the encrypted version of itself
91 92 93 |
# File 'lib/garcon/utility/crypto.rb', line 91 def encrypt(password = nil, salt = nil) Garcon::Crypto.encrypt(self, password, salt) end |