Moves Argon2 to real nuget (#163)

This commit is contained in:
Kamron Batman 2020-06-25 13:06:31 -07:00 • committed by GitHub
parent 1246a135f7
commit 561b40c3d8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
21 changed files with 43 additions and 718 deletions

View file

@ -26,7 +26,9 @@ namespace Server.Accounting.Security
public class Argon2PasswordProtection : IPasswordProtection
{
public static IPasswordProtection Instance = new Argon2PasswordProtection();
private Argon2PasswordHasher m_PasswordHasher = new Argon2PasswordHasher(RandomProviders.SecureProvider as RandomNumberGenerator);
private Argon2PasswordHasher m_PasswordHasher = new Argon2PasswordHasher(
rng: RandomProviders.SecureProvider as RandomNumberGenerator
);
public string EncryptPassword(string plainPassword) =>
m_PasswordHasher.Hash(plainPassword);