title: Encryption-Decryption in Rails
body: <p>I am using <code>require 'digest/sha1'</code> 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 <code>digest/sha1</code>?
  Or does anyone know any algorithm which supports encryption &amp; decryption as well?</p>
  
  <p>I am using ruby on rails so I need Ruby way to accomplish it.</p>