Cleans up Argon2 (#141)

This commit is contained in:
Kamron Batman 2020-05-24 19:13:19 -07:00 • committed by GitHub
parent 5d51e97c52
commit f957a1dd5b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 17 additions and 39 deletions

View file

@ -3,7 +3,7 @@
* Copyright (C) 2019-2020 - ModernUO Development Team *
* Email: hi@modernuo.com *
* File: Argon2PasswordProtection.cs *
* Created: 2020/05/01 - Updated: 2020/05/02 *
* Created: 2020/05/01 - Updated: 2020/05/24 *
* *
* This program is free software: you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
@ -26,7 +26,7 @@ namespace Server.Accounting.Security
public class Argon2PasswordProtection : IPasswordProtection
{
public static IPasswordProtection Instance = new Argon2PasswordProtection();
private Argon2PasswordHasher m_PasswordHasher = new Argon2PasswordHasher();
private Argon2PasswordHasher m_PasswordHasher = new Argon2PasswordHasher(RandomProviders.SecureProvider as RandomNumberGenerator);
public string EncryptPassword(string plainPassword) =>
m_PasswordHasher.Hash(plainPassword);