Fixes RNG (#181)
This commit is contained in:
parent
319a990ede
commit
ff3a28ab84
8 changed files with 273 additions and 115 deletions
|
|
@ -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/24 *
|
||||
* Created: 2020/05/01 - Updated: 2020/07/25 *
|
||||
* *
|
||||
* 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 *
|
||||
|
|
@ -20,6 +20,7 @@
|
|||
*************************************************************************/
|
||||
|
||||
using System.Security.Cryptography;
|
||||
using Server.Random;
|
||||
|
||||
namespace Server.Accounting.Security
|
||||
{
|
||||
|
|
@ -27,7 +28,7 @@ namespace Server.Accounting.Security
|
|||
{
|
||||
public static IPasswordProtection Instance = new Argon2PasswordProtection();
|
||||
private Argon2PasswordHasher m_PasswordHasher = new Argon2PasswordHasher(
|
||||
rng: RandomProviders.SecureProvider as RandomNumberGenerator
|
||||
rng: (RandomSources.SecureSource as SecureRandom)?.Generator
|
||||
);
|
||||
|
||||
public string EncryptPassword(string plainPassword) =>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue