Posted on: 10/22/2014 11:11:48 AM | Views : 1835

I implements IPasswordHasher
public class MyPasswordHasher : IPasswordHasher { public string HashPassword(string password) { using (SHA256 mySHA256 = SHA256Managed.Create()) { byte[] hash = mySHA256.ComputeHash(Encoding.UTF8.GetBytes(password.ToString())); StringBuilder hashSB = new StringBuilder(); for (int i = 0; i < hash.Length; i++) { hashSB.Append(hash[i].ToString("x2")); } return hashSB.ToString(); } } public PasswordVerificationResult VerifyHashedPassword( string hashedPassword, string providedPassword) { if (hashedPassword == HashPassword(providedPassword)) return PasswordVerificationResult.Success; else return PasswordVerificationResult.Failed; } } I write in IdentityConfig  ...

Go to the complete details ...