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 databa
As Horace Ho explained, you should never encrypt a password but always store a crypted salt.
However, it's perfectly fine to crypt other kind of data, such as confidential information. Encryptor it's a simple but powerful wrapper for OpenSSL. It provides the ability to encrypt/decrypt attributes in any class.