Hi,
I'm doing a simple hashing of the password and stroing it to the database.
I'm using this code to hash the password:
public static string hashPassword(string value)
{
MD5 algorithm = MD5.Create();
byte[] data = algorithm.ComputeHash(Encoding.UTF8.GetBytes(value));
string md5 = "";
for (int i = 0; i < data.Length; i++)
{
md5 += data[i].ToString("x2").ToUpperInvariant();
}
return md5;
}
Everything works fine. However, now I need to login using the hash. How, can I retrieve the hashed password from the database?
I know that I need to write a decrypt based on the code above, however, it didn't really work. Any suggestions?
Go to the complete details ...