hash password in mssql (asp.net)
- by ile
Is this how hashed password stored in mssql should look like?
This is function I use to hash password (I found it in some tutorial)
public string EncryptPassword(string password)
{
    //we use codepage 1252 because that is what sql server uses
    byte[] pwdBytes = Encoding.GetEncoding(1252).GetBytes(password);
    byte[] hashBytes = System.Security.Cryptography.MD5.Create().ComputeHash(pwdBytes);
    return Encoding.GetEncoding(1252).GetString(hashBytes);
}
Thanks,
Ile