Skip to content

Commit 7f87b21

Browse files
authored
Merge pull request #24 from Neo-vortex/sha256-optimization
Sha256 optimization
2 parents b77f10f + 07a590f commit 7f87b21

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/KSFramework/Utilities/SecurityHelper.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,8 @@ public static class SecurityHelper
77
public static string GetSha256Hash(string input)
88
{
99
//using (var sha256 = new SHA256CryptoServiceProvider())
10-
using var sha256 = SHA256.Create();
1110
var byteValue = Encoding.UTF8.GetBytes(input);
12-
var byteHash = sha256.ComputeHash(byteValue);
11+
var byteHash = SHA256.HashData(byteValue);
1312
return Convert.ToBase64String(byteHash);
1413
//return BitConverter.ToString(byteHash).Replace("-", "").ToLower();
1514
}

0 commit comments

Comments
 (0)