Class AccountHasher<T>
Identity hashing delegated to PasswordAuthentication (which produces a key suitable for AES)
public class AccountHasher<T> : IPasswordHasher<T> where T : class, IUserAccount, new()
Type Parameters
T
- Inheritance
-
AccountHasher<T>
- Implements
- Inherited Members
Methods
HashPassword(T, string)
Returns a hashed representation of the supplied password for the specified user.
public string HashPassword(T user, string password)
Parameters
userTThe user whose password is to be hashed.
passwordstringThe password to hash.
Returns
- string
A hashed representation of the supplied
passwordfor the specifieduser.
Pack(string, string)
public static string Pack(string salt, string hash)
Parameters
Returns
Unpack(string)
public static (string salt, string hash) Unpack(string hashedPassword)
Parameters
hashedPasswordstring
Returns
VerifyHashedPassword(T, string, string)
Returns a PasswordVerificationResult indicating the result of a password hash comparison.
public PasswordVerificationResult VerifyHashedPassword(T user, string hashedPassword, string providedPassword)
Parameters
userTThe user whose password should be verified.
hashedPasswordstringThe hash value for a user's stored password.
providedPasswordstringThe password supplied for comparison.
Returns
- PasswordVerificationResult
A PasswordVerificationResult indicating the result of a password hash comparison.
Remarks
Implementations of this method should be time consistent.