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 559B

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