C
craigkenisston
I'm reviewing someone else asp.net application and I see the passwords
are encrypted with this code:
public static string Encrypt(string cleanString)
{
Byte[] clearBytes = new UnicodeEncoding().GetBytes(cleanString);
Byte[] hashedBytes = ((HashAlgorithm)
CryptoConfig.CreateFromName("MD5")).ComputeHash(clearBytes);
return BitConverter.ToString(hashedBytes);
}
And then this password is saved on a Varchar field in the database.
Is this the common practice? Is it similar to the encryption used in
the membership provider?
are encrypted with this code:
public static string Encrypt(string cleanString)
{
Byte[] clearBytes = new UnicodeEncoding().GetBytes(cleanString);
Byte[] hashedBytes = ((HashAlgorithm)
CryptoConfig.CreateFromName("MD5")).ComputeHash(clearBytes);
return BitConverter.ToString(hashedBytes);
}
And then this password is saved on a Varchar field in the database.
Is this the common practice? Is it similar to the encryption used in
the membership provider?