diff --git a/ProjectLighthouse/Helpers/CryptoHelper.cs b/ProjectLighthouse/Helpers/CryptoHelper.cs index cfa896a21..58a5282c0 100644 --- a/ProjectLighthouse/Helpers/CryptoHelper.cs +++ b/ProjectLighthouse/Helpers/CryptoHelper.cs @@ -9,9 +9,6 @@ namespace LBPUnion.ProjectLighthouse.Helpers; public static class CryptoHelper { - - private static readonly SHA256 sha256 = SHA256.Create(); - /// /// Generates a random SHA256 and BCrypted token /// @@ -156,7 +153,7 @@ private static bool ValuesEqual(string a, string b) public static string Sha256Hash(string str) => Sha256Hash(Encoding.UTF8.GetBytes(str)); - public static string Sha256Hash(byte[] bytes) => BitConverter.ToString(sha256.ComputeHash(bytes)).Replace("-", "").ToLower(); + public static string Sha256Hash(byte[] bytes) => BitConverter.ToString(SHA256.HashData(bytes)).Replace("-", "").ToLower(); public static string Sha1Hash(byte[] bytes) => BitConverter.ToString(SHA1.HashData(bytes)).Replace("-", "");