I store user passwords in the database in hashed form. I use for this System.Web.Helpers.Crypto . Here is an example of the encryption code:
string password = ""; string hash = Crypto.HashPassword(password); bool succes = Crypto.VerifyHashedPassword(hash, password); That is, I am hashing passwords, writing to the database. And when I authorize a user, I can check if he entered the correct password. But what if the user forgot his password? How can a hashcode lead back to normal and generate a password?