Created
September 9, 2010 06:02
-
-
Save krio/571459 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'crypt/rijndael' | |
#Set a pass-phrase that only you and receiver know | |
super_secret_key = Crypt::Rijndael.new("Don't tell anyone this key") | |
#Encrypt a string using the secret key | |
encrypted_string = super_secret_key.encrypt_string("this is the string that we need to hide!!") | |
#Decrypt the string using the same secret key | |
decrypted_string = super_secret_key.decrypt_string(encrypted_string) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
What about the iv?