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.