Encryption-Decreyption 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 7:33 UTC
Read the original article Hit count: 449

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.

© Stack Overflow or respective owner

Related posts about ruby

Related posts about ruby-on-rails