hash password in mssql (asp.net)

Posted by ile on Stack Overflow See other posts from Stack Overflow or by ile
Published on 2010-05-13T10:06:38Z Indexed on 2010/05/13 10:14 UTC
Read the original article Hit count: 229

Filed under:
|
|
|

Is this how hashed password stored in mssql should look like?

alt text

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

© Stack Overflow or respective owner

Related posts about sql

Related posts about hash