views:

20

answers:

1

Is there a Ruby equivalent of PHP’s mcrypt_encrypt() function

A: 

check the Crypt gem - http://crypt.rubyforge.org/index.html

potatopeelings
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?
ffffff
http://crypt.rubyforge.org/rijndael.html. CBC is the default (and only mode - http://crypt.rubyforge.org/cbc.html). Not sure about IV though, you might want to raise a question in the forum or tracker @ http://rubyforge.org/frs/?group_id=899
potatopeelings