Ejemplo n.º 1
0
        public void DeriveEntropyHex_ExceptionTest()
        {
            var bip85 = new BIP0085(Xprv);

            Assert.Throws <ArgumentOutOfRangeException>(() => bip85.DeriveEntropyHex(-1, 0));
            Assert.Throws <ArgumentOutOfRangeException>(() => bip85.DeriveEntropyHex(15, 0));
            Assert.Throws <ArgumentOutOfRangeException>(() => bip85.DeriveEntropyHex(65, 0));

            bip85.Dispose();
            Assert.Throws <ObjectDisposedException>(() => bip85.DeriveEntropyHex(16, 0));
        }
Ejemplo n.º 2
0
        public void DeriveEntropyHexTest(string xprv, int byteLen, uint index, string expected)
        {
            using BIP0085 bip85 = new BIP0085(xprv);
            string actual = bip85.DeriveEntropyHex(byteLen, index);

            Assert.Equal(expected, actual);
        }