in reply to encryption and decryption
If it is UNIX type passwords you are thinking of, then you don't actually decrypt, but rather encrypt and compare
See crypt()
I have also used Crypt::PasswdMD5 in the past with much success.