Skip to content

Commit

Permalink
Use the static system SHA256 in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Coding-Enthusiast committed Oct 20, 2024
1 parent e070417 commit 968c7af
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions Src/Tests/Backend/Hashing/Sha256FoTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -203,13 +203,11 @@ private static byte[] GetRandomBytes(int len)
}
private static byte[] ComputeSingleSha(byte[] data)
{
using System.Security.Cryptography.SHA256 sysSha = System.Security.Cryptography.SHA256.Create();
return sysSha.ComputeHash(data);
return System.Security.Cryptography.SHA256.HashData(data);
}
private static byte[] ComputeDoubleSha(byte[] data)
{
using System.Security.Cryptography.SHA256 sysSha = System.Security.Cryptography.SHA256.Create();
return sysSha.ComputeHash(sysSha.ComputeHash(data));
return System.Security.Cryptography.SHA256.HashData(System.Security.Cryptography.SHA256.HashData(data));
}


Expand Down

0 comments on commit 968c7af

Please sign in to comment.