using System.Security.Cryptography;
public static void Main()
string sso_key = "ABCD/EXAMPLE+SUPPLIER+KEY/0123456789/0123456789/FOR+TESTING+ONLY/0123456789/0123456789==";
string expiry = "2014-06-24T09:30:00Z";
string nonce = "000/NONCE+TEST/123456789";
string url = "http://steadfast-supplier.example.com/some-page";
string user = "john@broker.example.com";
byte[] key = Convert.FromBase64String(sso_key);
string message = expiry + '|' + nonce + '|' + url + '|' + user;
using (HMACSHA1 hmacAlgorithm = new HMACSHA1(key))
hmac = hmacAlgorithm.ComputeHash(Encoding.UTF8.GetBytes(message));
Console.WriteLine("Message: " + message);
Console.WriteLine("HMAC: " + Convert.ToBase64String(hmac));
Console.WriteLine("Expected HMAC: wmxQPMXbD0bx3sKU5uhfKlXtg7A=");