Table of Contents

Class AccountHasher<T>

Namespace
The.Web.Security
Assembly
Instagile.Web.dll

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

user T

The user whose password is to be hashed.

password string

The password to hash.

Returns

string

A hashed representation of the supplied password for the specified user.

Pack(string, string)

public static string Pack(string salt, string hash)

Parameters

salt string
hash string

Returns

string

Unpack(string)

public static (string salt, string hash) Unpack(string hashedPassword)

Parameters

hashedPassword string

Returns

(string salt, string hash)

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

user T

The user whose password should be verified.

hashedPassword string

The hash value for a user's stored password.

providedPassword string

The 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.