using System.Security.Cryptography;
string mensaje = "aefawef";
string claveSecreta = "awefawe";
byte[] mensajeBytes = Encoding.UTF8.GetBytes(mensaje);
byte[] claveBytes = Encoding.UTF8.GetBytes(claveSecreta);
using (HMACSHA1 hmac = new HMACSHA1(claveBytes))
byte[] hash = hmac.ComputeHash(mensajeBytes);
string hashHex = BitConverter.ToString(hash).Replace("-", "").ToUpper();
Console.WriteLine("Mensaje: " + mensaje);
Console.WriteLine("Hash: " + hashHex);