Encryption-Decryption in Rails
Posted
by Salil
on Stack Overflow
See other posts from Stack Overflow
or by Salil
Published on 2010-04-26T07:27:11Z
Indexed on
2010/04/26
8:23 UTC
Read the original article
Hit count: 241
Hi All,
I am using require 'digest/sha1'
to encrypt my password and save into database. During login I authenticate by matching the encrypted password saved in database and again encrypted the one use enter in password field. As of now everything works fine but now I want to do 'Forgot Password' functionality. To do this I need to decrypt the password which is saved in database to find original one. How to decrypt using digest/sha1
?
Or does anyone know any algorithm which supports encryption & decryption as well?
I am using ruby on rails so I need Ruby way to accomplish it.
© Stack Overflow or respective owner