using System.Security.Cryptography;
public static void Main()
string ApplicationID = "3478628962486485";
string AgentUserName = "Majd26";
string IsConfirmed = "True";
string AgentPassword = "P@ssw0rd";
string ReceiverWallet = "0788387135";
string SenderWallet = "0776801913";
string TransactionTypeCode = "75";
string Signature = SetSHA512(Key, Amount, IsConfirmed, AgentUserName, AgentPassword, ReceiverWallet, SenderWallet, TransactionTypeCode);
Console.WriteLine("Key SHA256 is: " + Key);
Console.WriteLine("Signature SHA512 is: " + Signature);
private static string SetSHA256(string ApplicationID)
using (var SHA256Hash = SHA256.Create())
byte[] sourceBytes = Encoding.UTF8.GetBytes(ApplicationID);
byte[] hashBytes = SHA256Hash.ComputeHash(sourceBytes);
return BitConverter.ToString(hashBytes).Replace("-", String.Empty);
private static string SetSHA512(string Key, string Amount, string IsConfirmed, string AgentUserName, string AgentPassword, string ReceiverWallet, string SenderWallet, string TransactionTypeCode)
using (var SHA256Hash = SHA256.Create())
string Source = Key + Amount + IsConfirmed.ToString() + ReceiverWallet + SenderWallet + AgentUserName + AgentPassword + Key;
Console.WriteLine("Source: " + Source);
byte[] sourceBytes = Encoding.UTF8.GetBytes(Source);
byte[] hashBytes = SHA256Hash.ComputeHash(sourceBytes);
return BitConverter.ToString(hashBytes).Replace("-", String.Empty);