using System.Security.Cryptography;
public static void Main()
string salt, sessionId, date, lang, theme, fullscreen;
date= DateTime.UtcNow.ToString("u");;
const string PublicKey = "OCWBZJHuWxyfENrjy6lE";
const string PrivateKey = "9EgfDoaTcAshEaOWEy6p";
var message = date + lang + theme + fullscreen + sessionId + salt;
var theDigest = CalculateDigest(PublicKey, PrivateKey, message);
Console.WriteLine(theDigest);
Console.WriteLine("https://enrichment.tpay.me/headerenrichment/script-staging?salt="+salt+"&sessionId="+sessionId+"&date="+date+"&lang="+lang+"&theme="+theme+"&fullscreen="+fullscreen+"&digest="+theDigest);
public static string CalculateDigest(string publicKey, string privateKey, string message)
using (var hash = new HMACSHA256(Encoding.UTF8.GetBytes(privateKey)))
digest = publicKey + ":" + string.Join("", hash.ComputeHash(Encoding.UTF8.GetBytes(message)).Select(b => b.ToString("x2")));