C# sha256 sample code
using System.Security.Cryptography;
using System.Text;
public class Sha256Hash
{
public static string Encode(byte[] input)
{
var sha256 = SHA256.Create();
var hash = sha256.ComputeHash(input);
var sb = new StringBuilder();
foreach (var t in hash)
{
sb.Append(t.ToString("x2"));
}
return sb.ToString();
}
public static void Main(string[] args)
{
string input = "1234567";
string encoded = Encode(Encoding.UTF8.GetBytes(input));
Console.WriteLine("Encoded: " + encoded);
}
}