module Encryptor::String
Adds encrypt
and decrypt
methods to strings
Public Instance Methods
decrypt(options = {})
click to toggle source
Returns a new string containing the decrypted version of itself
# File lib/encryptor/string.rb, line 15 def decrypt(options = {}) Encryptor.decrypt(options.merge(:value => self)) end
decrypt!(options ={})
click to toggle source
Replaces the contents of a string with the decrypted version of itself
# File lib/encryptor/string.rb, line 20 def decrypt!(options ={}) replace decrypt(options) end
encrypt(options = {})
click to toggle source
Returns a new string containing the encrypted version of itself
# File lib/encryptor/string.rb, line 5 def encrypt(options = {}) Encryptor.encrypt(options.merge(:value => self)) end
encrypt!(options ={})
click to toggle source
Replaces the contents of a string with the encrypted version of itself
# File lib/encryptor/string.rb, line 10 def encrypt!(options ={}) replace encrypt(options) end