Class PasswordHashingArgon2
Argon2 implementation of IPasswordHashing.
public sealed class PasswordHashingArgon2 : IPasswordHashing
- Inheritance
-
PasswordHashingArgon2
- Implements
- Inherited Members
Constructors
PasswordHashingArgon2(IOptionsMonitor<Argon2Settings>)
Argon2 implementation of IPasswordHashing.
public PasswordHashingArgon2(IOptionsMonitor<Argon2Settings> optionsMonitor)
Parameters
optionsMonitorIOptionsMonitor<Argon2Settings>
Methods
HashPassword(string, PepperBrand?)
Hashes a password to make it feasible for insertion into a db.
public Task<string> HashPassword(string password, PepperBrand? pepperBrand)
Parameters
passwordstringThe password to hash.
pepperBrandPepperBrand[OPTIONAL] Pepper brand to append to the PW.
Returns
VerifyPassword(string, User)
Verifies a User's password.
public Task<bool> VerifyPassword(string password, User user)
Parameters
Returns
VerifyPassword(string, string)
Verifies a password against a hash.
public Task<bool> VerifyPassword(string password, string hash)