Encryption-Decreyption in Rails
- by Salil
Hi All,
I am using "require 'digest/sha1'" ro encrypt my password and save into database. While login i authenticate by matching the encrepted passowrd 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 Passowrd' 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 someone know any algoritham which supports encryption & decryption as well?
Iam using ruby-on-rails so i need Ruby way to accomplish it.