feat: Adds .NET 10 / C# 14 support. (#2258)

### Summary
* Adds .NET 10 support
* Bumps to C# 14
This commit is contained in:
Kamron Batman 2025-11-11 11:26:34 -08:00 • committed by GitHub
parent fbf8497c59
commit 3a3f5ee518
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
16 changed files with 124 additions and 154 deletions

View file

@ -1,6 +1,6 @@
/*************************************************************************
* ModernUO *
* Copyright 2019-2023 - ModernUO Development Team *
* Copyright 2019-2025 - ModernUO Development Team *
* Email: hi@modernuo.com *
* File: Argon2PasswordProtection.cs *
* *
@ -15,18 +15,17 @@
using System.Security.Cryptography;
namespace Server.Accounting.Security
namespace Server.Accounting.Security;
public class Argon2PasswordProtection : IPasswordProtection
{
public class Argon2PasswordProtection : IPasswordProtection
{
public static IPasswordProtection Instance = new Argon2PasswordProtection();
public static IPasswordProtection Instance = new Argon2PasswordProtection();
private readonly Argon2PasswordHasher m_PasswordHasher = new(rng: BuiltInSecureRng.Generator);
private readonly Argon2PasswordHasher m_PasswordHasher = new(rng: RandomNumberGenerator.Create());
public string EncryptPassword(string plainPassword) =>
m_PasswordHasher.Hash(plainPassword);
public string EncryptPassword(string plainPassword) =>
m_PasswordHasher.Hash(plainPassword);
public bool ValidatePassword(string encryptedPassword, string plainPassword) =>
m_PasswordHasher.Verify(encryptedPassword, plainPassword);
}
public bool ValidatePassword(string encryptedPassword, string plainPassword) =>
m_PasswordHasher.Verify(encryptedPassword, plainPassword);
}