using System.Security.Cryptography;
public static void Main()
string clientKey = "20574";
string clientPass = "20574";
string mifareId = "049058CADE3280";
string saleTransactionId = "1596321";
string data = string.Concat(clientKey, clientPass, mifareId, saleTransactionId);
SHA1 sha = new SHA1CryptoServiceProvider();
byte[] bytes = Encoding.ASCII.GetBytes(data);
byte[] hashingbytes = sha.ComputeHash(bytes);
string hash = HttpUtility.UrlEncode(Convert.ToBase64String(hashingbytes));