using System.Security.Cryptography;
public static void Main()
byte[] data = Encoding.UTF8.GetBytes(text);
Console.WriteLine("data DEC: " + data.Aggregate("", (a, b) => a + " " + b));
Console.WriteLine("data HEX: " + data.Aggregate("", (a, b) => a + " " + b.ToString("X2")) + "\n");
byte[] hash = SHA512.Create().ComputeHash(data);
Console.WriteLine("hash DEC: " + hash.Aggregate("", (a, b) => a + " " + b));
Console.WriteLine("hash HEX: " + hash.Aggregate("", (a, b) => a + " " + b.ToString("X2")) + "\n");
string outputOld = Convert.ToHexString(hash);
string outputNew = Convert.ToBase64String(hash);
Console.WriteLine("output OLD: " + outputOld);
Console.WriteLine("output NEW: " + outputNew);