Author: jehoshuakrush | Posted on: 8/12/2010 9:18:48 AM | Views : 351

Hi all,
I have a custom membership user class and custom MembershipProvider working against database. Due to security reasons the user passwords are stored in the database as hashed values. So my procedure 
public override bool ValidateUser(string username, string password) is
{
   //select hashed password from db
   return (EncodePassword(password) == dbpassword)
}
private string EncodePassword(string password)
        {
            string encodedPassword = password;
            HMACSHA1 hash = new HMACSHA1();
            hash.Key = Util.HexToByte(machineKey.ValidationKey);  // <-key from web.config
        &nbs ...

Go to the complete details ...