You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
13 lines
370 B
13 lines
370 B
using System.Security.Cryptography;
|
|
|
|
namespace System;
|
|
|
|
internal static class AbpStringCryptographyExtensions
|
|
{
|
|
public static string Sha256(this string planText, byte[] salt)
|
|
{
|
|
var data = planText.GetBytes();
|
|
using var hmacsha256 = new HMACSHA256(salt);
|
|
return BitConverter.ToString(hmacsha256.ComputeHash(data));
|
|
}
|
|
}
|
|
|