module MultiIndex::Encryption
Public Instance Methods
decrypt(text)
click to toggle source
# File lib/multi_index/encryption.rb, line 22 def decrypt(text) Encryptor.decrypt(Base64.decode64(text.force_encoding('ASCII-8BIT')), :key => secret_key, :algorithm => 'aes-256-ecb').strip end
encrypt(text)
click to toggle source
# File lib/multi_index/encryption.rb, line 16 def encrypt(text) Base64.encode64(Encryptor.encrypt(text.strip, :key => secret_key, :algorithm => 'aes-256-ecb')).force_encoding('UTF-8').strip end
secret_key()
click to toggle source
# File lib/multi_index/encryption.rb, line 12 def secret_key 'PLrijCx6/ZD3ET6im5OI7A=' end