DZone Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world
Quick Two Encryption With ActiveSupport & Ruby On Rails
secret = Digest::SHA1.hexdigest("yourpass")
a = ActiveSupport::MessageEncryptor.new(secret)
b = a.encrypt("eh")
c = ActiveSupport::MessageEncryptor.new(secret)
c.decrypt(b)





