Method: Encrypt#encrypt

Defined in:
lib/vimamsa/encrypt.rb

#encrypt(text) ⇒ Object



52
53
54
55
56
57
58
59
# File 'lib/vimamsa/encrypt.rb', line 52

def encrypt(text)
  cipher = @enc
  encrypted = cipher.update text
  encrypted << cipher.final
  encrypted = encrypted.unpack("H*")[0].upcase
  @enc.reset
  return encrypted
end