Fix CA1850: Prefer static HashData method over ComputeHash

This commit is contained in:
Haselnussbomber 2025-10-24 04:47:17 +02:00
parent 0556102ff5
commit 2b654e11a8
No known key found for this signature in database
GPG key ID: BB905BB49E7295D1

View file

@ -1,4 +1,4 @@
using System.Security.Cryptography;
using System.Security.Cryptography;
namespace Dalamud.Utility;
@ -24,8 +24,7 @@ public static class Hash
/// <returns>The computed hash.</returns>
internal static string GetSha256Hash(byte[] buffer)
{
using var sha = SHA256.Create();
var hash = sha.ComputeHash(buffer);
var hash = SHA256.HashData(buffer);
return ByteArrayToString(hash);
}