module Garcon::Crypto::String

Adds ‘encrypt` and `decrypt` methods to strings.

Public Instance Methods

decrypt(password = nil, salt = nil) click to toggle source

Returns a new string containing the decrypted version of itself

# 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) click to toggle source

Returns a new string containing the encrypted version of itself

# File lib/garcon/utility/crypto.rb, line 91
def encrypt(password = nil, salt = nil)
  Garcon::Crypto.encrypt(self, password, salt)
end