using System.Security.Cryptography;
public static void Main()
var key = "uauiyuanaiuauhoh191890";
var message = "Titulo|Olá Sr. Macaco, você ja comeu sua banana hoje?|809810981989018198901";
System.Text.ASCIIEncoding encoding = new System.Text.ASCIIEncoding();
byte[] keyByte = encoding.GetBytes(key);
HMACSHA256 hmacsha256 = new HMACSHA256(keyByte);
byte[] messageBytes = encoding.GetBytes(message);
var hash = hmacsha256.ComputeHash(messageBytes);
Console.WriteLine(ByteToString(hash));
public static string ByteToString(byte[] buff)
for (int i = 0; i < buff.Length; i++)
sbinary += buff[i].ToString("X2");