using System.Security.Cryptography;
public static void Main()
string message = "{\"Topic\":\"FinancialTransactions\",\"ClientId\":\"4d172971-0ef1-46ac-93e2-cbeab649c103\",\"Division\":102,\"Action\":\"Update\",\"Key\":\"76368e4f-5495-4d9e-b1b4-079666bf3b59\",\"ExactOnlineEndpoint\":\"https://www.start.exactonline.nl/api/v1/102/financialtransaction/Transactions(guid'76368e4f-5495-4d9e-b1b4-079666bf3b59')\",\"EventCreatedOn\":\"2017-08-04T16:25:29.277\"}";
string secret = "TuJBuL8GrCXs";
Console.WriteLine(GetHMAC256HexString(message, secret));
public static string GetHMAC256HexString(string message, string secretKey)
ASCIIEncoding encoding = new ASCIIEncoding();
byte[] keyByte = encoding.GetBytes(secretKey);
byte[] messageBytes = encoding.GetBytes(message);
HMACSHA256 hmac = new HMACSHA256(keyByte);
byte[] hashMessage = hmac.ComputeHash(messageBytes);
string hexString = string.Concat(hashMessage.Select(x => x.ToString("X2")));