From: Stefan Rusterholz Date: 2007-09-03T14:33:29+09:00 Subject: Re: 2 Way encryption for password Gabriel Dragffy wrote: > Hi > > I'm creating a password database (a dangerous thing to do, I know!) > normally I'd hash the passwords for storage in the DB, but in this > case I need to be able to also reverse them to their original state. > I'm familiar with the digest module, but of course it isn't of use > here. I didn't see anything obvious on my Google travels. Could > anyone suggest how to perform encryption in ruby, in particular based > on a rails application...? > > Many thanks > > Gabriel Small nitpick about terminology: encryption is per definition 2 way, what is often wrongly refered to as 1 way encryption is normally cryptographic hashing (also see the note http://en.wikipedia.org/wiki/One-way_encryption: "Note that encryption is, by definition, reversible. Hence, the term one-way encryption is slightly incorrect in a sense.") Regards Stefan -- Posted via http://www.ruby-forum.com/.