Hi,

I need your help for forgot password decryption.

When a user registers , his password will be encrypted using md5();
and When he sign in, I will encrypt his password using MD5() and I will compare it with value already stored in to table,

My problem is,
If he requests for forgotpassword, I have to send the password to him,how to do decrypt that MD5 password and send to him.

Is there any way to store password with encryption and decryption,, and for forgot password also?

Member Avatar for amigura

No to decrypt of md5. Best solution is to send them a new password and let them change it if needed.

What @amigura said. Hash values generated by the like of md5, des, sha1/sha256, etc. are NOT reversable by design.

Just in case, here is a nice and short description of the difference between hashing and encryption. Learn the difference.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.