public void Constructor_FromRng_OutOfRangeExceptionTest() { MockRng rng = new MockRng(new byte[0]); Assert.Throws <ArgumentOutOfRangeException>(() => new BIP0032(rng, 15)); Assert.Throws <ArgumentOutOfRangeException>(() => new BIP0032(rng, 65)); }
public void Constructor_FromRng_OutOfRangeExceptionTest() { var rng = new MockRng(Array.Empty <byte>()); Assert.Throws <ArgumentOutOfRangeException>(() => new BIP0032(rng, 15)); Assert.Throws <ArgumentOutOfRangeException>(() => new BIP0032(rng, 65)); }
public void Constructor_FromRngTest() { MockRng rng = new MockRng("000102030405060708090a0b0c0d0e0f"); using BIP0032 bip = new BIP0032(rng, 16); string actual = bip.ToBase58(false); string expected = "xprv9s21ZrQH143K3QTDL4LXw2F7HEK3wJUD2nW2nRk4stbPy6cq3jPPqjiChkVvvNKmPGJxWUtg6LnF5kejMRNNU3TGtRBeJgk33yuGBxrMPHi"; Assert.Equal(expected, actual); }
public void Constructor_FromRngTest() { var rng = new MockRng("bfdf93686a31cd55fc5c1b8fd290fe39"); using BIP0039 bip = new BIP0039(rng, 16); string actual = bip.ToMnemonic(); string expected = "save wish sure stamp broom priority vapor lock more nest display inch"; Assert.Equal(expected, actual); }
public void Constructor_FromRngTest() { var rng = new MockRng(BigInteger.Parse("3423992296655289706780599506247192518735").ToByteArray(true, true)); using var elmn = new ElectrumMnemonic(rng, ElectrumMnemonic.MnemonicType.Standard, BIP0039.WordLists.Spanish); string actual = elmn.ToMnemonic(); string expected = "almíbar tibio superar vencer hacha peatón príncipe matar consejo polen vehículo odisea"; Assert.Equal(expected, actual); }