Hi im mohd anas i used Digest/sha2 to make password into "hashed password". Now how can i retrieve the original password which i was typed(decryption)...........
I don't think the passwords encrypted using Digest/sha2 can be retrieved
It is worth noting the reason for using a one way hash like sha2. You are adding an extra layer of protection in case your database is compromised. So, short of a brute force attack, there is no way to get the original password from the hash. As the previous poster shows, you authenticate the user by computing a hash of the clear password as typed by the user and compare it with the hash in the database. You do not try to reverse the hash and compare it with the clear password.