Class PasswordHasher
A base implementation of the Implements password hashing methods. . This implementation is an implementation of PBKDF2.
Implements
Namespace: Sartorius.SAF.Security
Assembly: Sartorius.SAF.dll
Syntax
public class PasswordHasher : IPasswordHasher
Methods
View SourceHash(string)
Implements password hashing methods.
Declaration
public virtual string Hash(string password)
Parameters
| Type | Name | Description |
|---|---|---|
| string | password |
Returns
| Type | Description |
|---|---|
| string |
Hash(string, PasswordHasherOptions)
Hash the given password using given has options.
Declaration
public virtual string Hash(string password, PasswordHasherOptions options)
Parameters
| Type | Name | Description |
|---|---|---|
| string | password | The password to hash. |
| PasswordHasherOptions | options | The options for hash. |
Returns
| Type | Description |
|---|---|
| string | A hashed password. |
Verify(string, string)
Implements password hashing methods.
Declaration
public virtual bool Verify(string hashedPassword, string providedPassword)
Parameters
| Type | Name | Description |
|---|---|---|
| string | hashedPassword | |
| string | providedPassword |
Returns
| Type | Description |
|---|---|
| bool |