Пример #1
0
        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);
        }
Пример #2
0
 public byte[] Keccak(byte[] input)
 {
     Keccak256.Initialize();
     Keccak256.TransformBytes(input.ToArray(), 0, input.Count());
     return(Keccak256.TransformFinal().GetBytes());
 }