1
0
mirror of https://git.teknik.io/Teknikode/Teknik.git synced 2023-08-02 14:16:22 +02:00
Teknik/Utilities/Cryptography/SHA384.cs

19 lines
462 B
C#
Raw Normal View History

using System.Text;
namespace Teknik.Utilities.Cryptography
{
public class SHA384
{
public static byte[] Hash(string key, string value)
{
byte[] keyBytes = Encoding.UTF8.GetBytes(key);
byte[] data = Encoding.UTF8.GetBytes(value);
var cipher = new System.Security.Cryptography.HMACSHA384(keyBytes);
byte[] result = cipher.ComputeHash(data);
return result;
}
}
}