Exemplo n.º 1
0
        public void DeriveEntropy_ExceptionTest()
        {
            var bip85    = new BIP0085(Xprv);
            var badPath  = new BIP0032Path(1);
            var badPath2 = new BIP0032Path("m/1'/0/0'");

            Assert.Throws <ArgumentNullException>(() => bip85.DeriveEntropy(null));
            Assert.Throws <ArgumentException>(() => bip85.DeriveEntropy(badPath));
            Assert.Throws <ArgumentException>(() => bip85.DeriveEntropy(badPath2));

            bip85.Dispose();
            Assert.Throws <ObjectDisposedException>(() => bip85.DeriveEntropy(new BIP0032Path(uint.MaxValue)));
        }
Exemplo n.º 2
0
        public void DeriveEntropyTest(string xprv, BIP0032Path path, byte[] expected)
        {
            using BIP0085 bip85 = new BIP0085(xprv);
            byte[] actual = bip85.DeriveEntropy(path);

            Assert.Equal(expected, actual);
        }