Is there a Ruby equivalent of PHP’s mcrypt_encrypt() function?
1 Answer
check the Crypt gem - http://crypt.rubyforge.org/index.html
2 Comments
freddiefujiwara
Thank you for answering! If I write the following code mcrypt_encrypt(MCRYPT_RIJNDAEL_128, $key, $raw, MCRYPT_MODE_CBC, $iv); How to write in ruby?
potatopeelings
crypt.rubyforge.org/rijndael.html. CBC is the default (and only mode - crypt.rubyforge.org/cbc.html). Not sure about IV though, you might want to raise a question in the forum or tracker @ rubyforge.org/frs/?group_id=899