static void Main(string[] args) { string contStr = "The quick brown fox jumps over the lazy dog"; var inputBytes = Encoding.UTF8.GetBytes(contStr); var output = SHA3Lib.CalcX11(inputBytes); var hexStr = ToSolidHex(output); Console.WriteLine($" Input string: {contStr}"); Console.WriteLine($" HEX result string ({output.Length} bytes): {hexStr}"); Console.ReadLine(); }
public static byte[] HashX11(params byte[][] bytes) { // Join all the byte arrays List <byte> totalBytes = new List <byte>(); foreach (byte[] b in bytes) { totalBytes.AddRange(b); } byte[] hash = totalBytes.ToArray(); hash = SHA3Lib.CalcX11(hash); var hash32 = new byte[32]; Array.Copy(hash, hash32, 32); return(hash32); }