Skip to content

Commit 968c7af

Browse files
Use the static system SHA256 in tests
1 parent e070417 commit 968c7af

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

Src/Tests/Backend/Hashing/Sha256FoTests.cs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -203,13 +203,11 @@ private static byte[] GetRandomBytes(int len)
203203
}
204204
private static byte[] ComputeSingleSha(byte[] data)
205205
{
206-
using System.Security.Cryptography.SHA256 sysSha = System.Security.Cryptography.SHA256.Create();
207-
return sysSha.ComputeHash(data);
206+
return System.Security.Cryptography.SHA256.HashData(data);
208207
}
209208
private static byte[] ComputeDoubleSha(byte[] data)
210209
{
211-
using System.Security.Cryptography.SHA256 sysSha = System.Security.Cryptography.SHA256.Create();
212-
return sysSha.ComputeHash(sysSha.ComputeHash(data));
210+
return System.Security.Cryptography.SHA256.HashData(System.Security.Cryptography.SHA256.HashData(data));
213211
}
214212

215213

0 commit comments

Comments
 (0)