Interface IPasswordHasher
Implements password hashing methods.
Namespace: Sartorius.SAF.Security
Assembly: Sartorius.SAF.dll
Syntax
[InheritedExport]
public interface IPasswordHasher
Methods
View SourceHash(String)
Hash the given password.
Declaration
string Hash(string password)
Parameters
Type | Name | Description |
---|---|---|
System.String | password | The password to hash. |
Returns
Type | Description |
---|---|
System.String | A hashed password. |
Hash(String, PasswordHasherOptions)
Hash the given password using given has options.
Declaration
string Hash(string password, PasswordHasherOptions options)
Parameters
Type | Name | Description |
---|---|---|
System.String | password | The password to hash. |
PasswordHasherOptions | options | The options for hash. |
Returns
Type | Description |
---|---|
System.String | A hashed password. |
Verify(String, String)
Verify that a password matches the hashedPassword
Declaration
bool Verify(string hashedPassword, string providedPassword)
Parameters
Type | Name | Description |
---|---|---|
System.String | hashedPassword | A hashed password as base 64 string. |
System.String | providedPassword | A provided password as plain text. |
Returns
Type | Description |
---|---|
System.Boolean | True if the hashedPassword and providedPassword equals, otherwise False. |