using System.Security.Cryptography;
public static void Main()
Console.WriteLine(ComputeHMAC("Hello Cypherpunk"));
public static string ComputeHMAC(string input)
using (SHA256 sha256 = SHA256Managed.Create())
byte[] plainBytes = Encoding.UTF8.GetBytes(input.ToString());
byte[] hashBytes = sha256.ComputeHash(plainBytes);
string HMAC = BitConverter.ToString(hashBytes).Replace("-", "");