M
Mike Tallman
In my current database I have passwords that were hashed and then stored
using the following method:
public static string Encrypt(string cleanString)
{
Byte[] clearBytes = new UnicodeEncoding().GetBytes(cleanString);
Byte[] hashedBytes =
((HashAlgorithm) CryptoConfig.CreateFromName
("MD5")).ComputeHash(clearBytes);
return BitConverter.ToString(hashedBytes);
}
I would like to use these passwords with the standard membership provider -
is it possible to convert the passwords into something the standard provider
can understand? I'm thinking if I could reverse the BitConverter ToString()
call I should be able to use the hashedBytes in the database. Does that make
sense, or is it even possible? Thanks
using the following method:
public static string Encrypt(string cleanString)
{
Byte[] clearBytes = new UnicodeEncoding().GetBytes(cleanString);
Byte[] hashedBytes =
((HashAlgorithm) CryptoConfig.CreateFromName
("MD5")).ComputeHash(clearBytes);
return BitConverter.ToString(hashedBytes);
}
I would like to use these passwords with the standard membership provider -
is it possible to convert the passwords into something the standard provider
can understand? I'm thinking if I could reverse the BitConverter ToString()
call I should be able to use the hashedBytes in the database. Does that make
sense, or is it even possible? Thanks