mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-13 12:14:16 +01:00
Fix CA1850: Prefer static HashData method over ComputeHash
This commit is contained in:
parent
0556102ff5
commit
2b654e11a8
1 changed files with 2 additions and 3 deletions
|
|
@ -1,4 +1,4 @@
|
||||||
using System.Security.Cryptography;
|
using System.Security.Cryptography;
|
||||||
|
|
||||||
namespace Dalamud.Utility;
|
namespace Dalamud.Utility;
|
||||||
|
|
||||||
|
|
@ -24,8 +24,7 @@ public static class Hash
|
||||||
/// <returns>The computed hash.</returns>
|
/// <returns>The computed hash.</returns>
|
||||||
internal static string GetSha256Hash(byte[] buffer)
|
internal static string GetSha256Hash(byte[] buffer)
|
||||||
{
|
{
|
||||||
using var sha = SHA256.Create();
|
var hash = SHA256.HashData(buffer);
|
||||||
var hash = sha.ComputeHash(buffer);
|
|
||||||
return ByteArrayToString(hash);
|
return ByteArrayToString(hash);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue