You have to understand the difference between hashing and encryption algorithms. ..
There is a fundamental difference between Hashing and Encryption algorithms, see this stackoverflow answer: Hashing is one way. You can not get your data/string from a hash code. Encryption is 2 way - you can decrypt again the encrypted string if you have the key with you.
In case you are interested in Hashing, for example to create a password hash, see my Tools Extension.
For your purposes store the hash value in your database...To check, if an entered password is valid, just compare the hash values. .
Taifun