123456789101112131415161718 |
- 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;
- }
- }
- }
|