Advertisement
Guest User

Untitled

a guest
Nov 20th, 2017
337
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.44 KB | None | 0 0
  1. Encoding enc = Encoding.GetEncoding("ASCII");
  2. string key = "53fa36cd57881e5a68e1c70558028b9dded8d72fbb1ea18f42832174313a5753";
  3. string packet = project.Variables["input_string"].Value;
  4. System.Security.Cryptography.HMACSHA256 hm = new System.Security.Cryptography.HMACSHA256(enc.GetBytes(key));
  5. byte[] result = hm.ComputeHash(enc.GetBytes(packet));
  6. String hex = BitConverter.ToString(result);
  7. hex = hex.Replace("-", "");
  8. return hex.ToLower();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement