Adds SHA512 support for ServUO (#124)
This commit is contained in:
parent
dad8a64fad
commit
2b4a6e1de1
8 changed files with 99 additions and 82 deletions
|
|
@ -1,7 +1,7 @@
|
|||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Security.Cryptography;
|
||||
using System.Text;
|
||||
using Server.Misc;
|
||||
|
||||
namespace Server.Accounting.Security
|
||||
{
|
||||
|
|
@ -16,7 +16,7 @@ namespace Server.Accounting.Security
|
|||
byte[] bytes = new byte[Encoding.ASCII.GetByteCount(password)];
|
||||
Encoding.ASCII.GetBytes(password, bytes);
|
||||
|
||||
return BitConverter.ToString(m_SHA1HashProvider.ComputeHash(bytes));
|
||||
return HexStringConverter.GetString(m_SHA1HashProvider.ComputeHash(bytes));
|
||||
}
|
||||
|
||||
public bool ValidatePassword(string encryptedPassword, string plainPassword) =>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue