using System.Security.Cryptography;
public static void Main()
using (SHA256 mySHA256 = SHA256.Create())
string pwd_plaintext = "%Al1442500";
var saltBinary = Convert.FromHexString("6f 31 54 b2 b9 59 93 6a af 0a 3d d0 b0 0e 29 6d fb 7e d5 73 d3 30 2e a7 08 1a 3f fe 20 ad 74 de".Replace(" ", ""));
var pwdPlainBinary = System.Text.Encoding.UTF8.GetBytes(pwd_plaintext);
byte[] hashValue = mySHA256.ComputeHash(Combine(saltBinary, pwdPlainBinary));
Console.WriteLine(Convert.ToHexString(hashValue));
public static byte[] Combine(byte[] first, byte[] second)
byte[] bytes = new byte[first.Length + second.Length];
Buffer.BlockCopy(first, 0, bytes, 0, first.Length);
Buffer.BlockCopy(second, 0, bytes, first.Length, second.Length);
public static byte[] FromHex(string hex)
hex = hex.Replace(" ", "");
byte[] raw = new byte[hex.Length / 2];
for (int i = 0; i < raw.Length; i++)
raw[i] = Convert.ToByte(hex.Substring(i * 2, 2), 16);