using System.Security.Cryptography;
public static void Main()
var hash = ComputeSHA256(s);
Console.WriteLine($"Sha256 of {s} computes to {hash}");
static string ComputeSHA256(string s)
using (SHA256 sha256 = SHA256.Create())
byte[] hashValue = sha256.ComputeHash(Encoding.UTF8.GetBytes(s));
return Convert.ToHexString(hashValue);