From 968c7aff78eaa31f5c6e5782c35d6820c9497014 Mon Sep 17 00:00:00 2001 From: Coding-Enthusiast Date: Sun, 20 Oct 2024 15:02:16 +0330 Subject: [PATCH] Use the static system SHA256 in tests --- Src/Tests/Backend/Hashing/Sha256FoTests.cs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/Src/Tests/Backend/Hashing/Sha256FoTests.cs b/Src/Tests/Backend/Hashing/Sha256FoTests.cs index 26d30ee..064028b 100644 --- a/Src/Tests/Backend/Hashing/Sha256FoTests.cs +++ b/Src/Tests/Backend/Hashing/Sha256FoTests.cs @@ -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)); }