Skip to content

Instantly share code, notes, and snippets.

@dan-manges
Created July 17, 2009 17:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dan-manges/149193 to your computer and use it in GitHub Desktop.
Save dan-manges/149193 to your computer and use it in GitHub Desktop.
require "rubygems"
gem "ezcrypto", "0.7"
require "ezcrypto"
key = EzCrypto::Key.new("x" * 32, :algorithm => "aes-256-cbc")
encrypted = key.encrypt("foo")
decrypted = key.decrypt(encrypted)
p decrypted
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment