The next generation of the Teknik Services. Written in ASP.NET. https://www.teknik.io/
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.

SHA384.cs 462B

123456789101112131415161718
  1. using System.Text;
  2. namespace Teknik.Utilities.Cryptography
  3. {
  4. public class SHA384
  5. {
  6. public static byte[] Hash(string key, string value)
  7. {
  8. byte[] keyBytes = Encoding.UTF8.GetBytes(key);
  9. byte[] data = Encoding.UTF8.GetBytes(value);
  10. var cipher = new System.Security.Cryptography.HMACSHA384(keyBytes);
  11. byte[] result = cipher.ComputeHash(data);
  12. return result;
  13. }
  14. }
  15. }