public byte[] CalculateHash(byte[] value) { var digest = new Keccak256(); var output = new byte[digest.BlockSize]; digest.TransformBytes(value, 0, value.Length); var result = digest.TransformFinal(); output = result.GetBytes(); return(output); }
public byte[] Keccak(byte[] input) { Keccak256.Initialize(); Keccak256.TransformBytes(input.ToArray(), 0, input.Count()); return(Keccak256.TransformFinal().GetBytes()); }