1 : hashing creates an unique string from an other string, encryption algo includes that you can get it back via decryption.
I would suggest sha1 instead of md5
2: as said higher, you "can't" decrypt a hash, it's possible to crack it via rainbow tables etc ( that's why you salt) but it's very far from a real encryption.
basic idea used by most of the sites out here is :
you hash the passord :
"123" becomes "pozehjgoiaufpazijazouzphrapzhopiazhrrpoah" you store that
then the users inputs "123" you hash the password and if it's equal to the hash in the database then the two passwords are both the same ;)
I would suggest sha1 instead of md5
2: as said higher, you "can't" decrypt a hash, it's possible to crack it via rainbow tables etc ( that's why you salt) but it's very far from a real encryption.
basic idea used by most of the sites out here is :
you hash the passord :
"123" becomes "pozehjgoiaufpazijazouzphrapzhopiazhrrpoah" you store that
then the users inputs "123" you hash the password and if it's equal to the hash in the database then the two passwords are both the same ;)
