Пример #1
0
        public static byte[] Address(this ECDsa key)
        {
            byte[] address = new byte[25];

            address[0] = 0x17;
            byte[] hash = SHA256.Create().ComputeHash(key.VerificationScript());

            RIPEMD160
            .Create()
            .ComputeHash(hash)
            .CopyTo(address, 1);

            // copy checksum to
            address.Take(21).CheckSum().CopyTo(address, 21);

            return(address);
        }