Exemplo n.º 1
0
        private static uint GetSignetMagic()
        {
            var           challengeBytes = DataEncoders.Encoders.Hex.DecodeData("512103ad5e0edad18cb1f0fc0d28a3d4f1f3e445640337489abb10404f2d1e086be430210359ef5021964fe22d6f8e05b2463c9540ce96883fe3b278760f048f5189f2e6c452ae");
            var           challenge      = new Script(challengeBytes);
            MemoryStream  ms             = new MemoryStream();
            BitcoinStream bitcoinStream  = new BitcoinStream(ms, true);

            bitcoinStream.ReadWrite(challenge);
            var h = Hashes.DoubleSHA256RawBytes(ms.ToArray(), 0, (int)ms.Length);

            return(Utils.ToUInt32(h, true));
        }
Exemplo n.º 2
0
 protected virtual byte[] CalculateHash(byte[] bytes, int offset, int length)
 {
     return(Hashes.DoubleSHA256RawBytes(bytes, offset, length));
 }