using System.Security.Cryptography;
using System.Collections.Generic;
public static void Main()
var time = DateTimeOffset.Now.ToUnixTimeSeconds().ToString();
Console.WriteLine(p.GenerateSignature("ur5av7xc5k28py4ks63ga3hx","jsDPKD5qLNbLjsgw6O9nqAuv",time));
Console.WriteLine(p.GenerateSignature("rdhw49kdn6mxxzwyhbr97a53","2iawVzh3yxw5Mu2VHKAMFEU2",time));
private string CalculateMD5Hash(string input)
MD5 md5 = System.Security.Cryptography.MD5.Create();
byte[] inputBytes = System.Text.Encoding.ASCII.GetBytes(input);
byte[] hash = md5.ComputeHash(inputBytes);
StringBuilder sb = new StringBuilder();
hash.ToList().ForEach(h => sb.Append(h.ToString("x2")));
for (int i = 0; i < hash.Length; i++)
Console.WriteLine("BYTE : " + hash[i].ToString());
Console.WriteLine("HEX1 : " + hash[i].ToString());
Console.WriteLine("HEX2 : " + hash[i].ToString("X2"));
Console.WriteLine("HEX3 : " + hash[i].ToString("x2"));
Console.WriteLine("BitConverter :");
Console.WriteLine(BitConverter.ToString(hash).Replace("-","").ToLower());
protected string GenerateSignature(string apiKey, string sharedSecret, string unixEpochTimeStampInSeconds)
MD5 md5 = System.Security.Cryptography.MD5.Create();
byte[] inputBytes = System.Text.Encoding.ASCII.GetBytes(apiKey + sharedSecret + unixEpochTimeStampInSeconds);
byte[] hash = md5.ComputeHash(inputBytes);
return BitConverter.ToString(hash).Replace("-", "").ToLower();