Class PasswordHasher
A base implementation of the
Inheritance
System.Object
PasswordHasher
Implements
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
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 |
---|---|---|
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
public virtual 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)
Implements password hashing methods.
Declaration
public virtual 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. |