Ejemplo n.º 1
0
 public void Base58Encoding()
 {
     const string addr = "mqAJmaxMcG5pPHHc3H3NtyXzY7kGbJLuMF";
     const string privkey = "92shANodC6Y4evT5kFzjNFQAdjqTtHAnDTLzqBBq4BbKUPyx6CD";
     var key = new DumpedPrivateKey(NetworkParameters.TestNet(), privkey).Key;
     Assert.AreEqual(privkey, key.GetPrivateKeyEncoded(NetworkParameters.TestNet()).ToString());
     Assert.AreEqual(addr, key.ToAddress(NetworkParameters.TestNet()).ToString());
 }
Ejemplo n.º 2
0
        public void Base58Encoding()
        {
            const string addr    = "mqAJmaxMcG5pPHHc3H3NtyXzY7kGbJLuMF";
            const string privkey = "92shANodC6Y4evT5kFzjNFQAdjqTtHAnDTLzqBBq4BbKUPyx6CD";
            var          key     = new DumpedPrivateKey(NetworkParameters.TestNet(), privkey).Key;

            Assert.AreEqual(privkey, key.GetPrivateKeyEncoded(NetworkParameters.TestNet()).ToString());
            Assert.AreEqual(addr, key.ToAddress(NetworkParameters.TestNet()).ToString());
        }