using System.Security.Cryptography;
public static void Main()
var transactionId = "123455";
var message = transactionId + language;
var publicKey = "EF48pcOY0Gt7q1ZlOyFB";
var privateKey = "kfqA2yCeE4bpiH83uFcU";
var theDigest = CalculateDigest(publicKey, privateKey, message);
Console.WriteLine(theDigest);
public static string CalculateDigest(string publicKey, string privateKey, string message)
var hash = new System.Security.Cryptography.HMACSHA256(System.Text.Encoding.UTF8.GetBytes(privateKey));
var correctHash = string.Join(string.Empty, hash.ComputeHash(System.Text.Encoding.UTF8.GetBytes(message)).Select(b => b.ToString("x2")));
digest = publicKey + ":" + correctHash;