Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Recommended two-way encryption gems for Ruby? [closed]

I'm in need of a two-way encryption solution for Ruby, such as Blowfish, Rijndael (AES) or other. The problem, however, is that I can't find an appropriate gem for it. I would like for the library to support several different encryption algorithms so I can compare the performance of each for optimal integration i my application. I would also like it to be open source.

I came across Crypt, but it doesn't install properly and doesn't look like it's been updated in a while. EzCrypto won't install, either. I also saw ruby-aes, but that only supports Rijndael.

After some GitHub searching, I found Encryptor, which seems to be something like what I'm looking for. However, I'd love to get some ideas about any gems/libraries I might have missed.

Thanks in advance!

like image 606
vonconrad Avatar asked Jan 04 '10 06:01

vonconrad


3 Answers

Why look so far, if everything you asked for is already available in your standard Ruby installation: the OpenSSL module.

The Cipher class provides encryption and decryption, have a look at

require 'openssl'
puts OpenSSL::Cipher.ciphers

for a list of available algorithms.

like image 99
emboss Avatar answered Nov 01 '22 08:11

emboss


I'd recommend Shuber's Encryptor - it wraps the OpenSSL library so you can use anything it supports.

like image 8
Mike Buckbee Avatar answered Nov 01 '22 06:11

Mike Buckbee


I came across Gibberish today. I haven't tried it out yet though.

like image 3
sivabudh Avatar answered Nov 01 '22 08:11

sivabudh