Esempio n. 1
0
        public static byte[] DoubleGroestl(byte[] dig)
        {
            Groestl512 digest = new Groestl512();

            NBitcoin.Altcoins.HashX11.HashResult res = digest.ComputeBytes(dig);
            //And do it again
            res = digest.ComputeBytes(res.GetBytes());             //Do the double hash
            return(res.GetBytes());
        }
Esempio n. 2
0
        public static byte[] GroestlHash(byte[] arr, int offset, int length)
        {
            var digest = new Groestl512();

            digest.update(arr, offset, length);
            var h1 = digest.digest();

            digest.reset();
            digest.update(h1, 0, h1.Length);
            return(digest.digest());
        }