From: Logan Capaldo Date: 2007-04-27T21:02:22+09:00 Subject: Re: Decode password ------=_Part_45276_6657435.1177675326258 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline On 4/27/07, Mitesh Jain wrote: > > Hi All, > i had encoded the password using, > > Digest::SHA1.hexdigest("change-me--#{pass}--") > > i got the password in the encoded form and i want to decode this string. > > How can i do this? > > -- > Posted via http://www.ruby-forum.com/. > > _why_ do you want to decode it? If it's to make sure a password entered by a user is correct, hash their entered password in the same way, and compare the hashes together. If its because you, or a user forgot their password, generate a new (usually random) known password, and use the hash of that, and then send the new password to the user. ------=_Part_45276_6657435.1177675326258--