示例#1
0
 public void Base58EncodingLeadingZero()
 {
     const string privkey = "91axuYLa8xK796DnBXXsMbjuc8pDYxYgJyQMvFzrZ6UfXaGYuqL";
     var key = new DumpedPrivateKey(NetworkParameters.TestNet(), privkey).Key;
     Assert.AreEqual(privkey, key.GetPrivateKeyEncoded(NetworkParameters.TestNet()).ToString());
     Assert.AreEqual(0, key.GetPrivKeyBytes()[0]);
 }
示例#2
0
        public void Base58EncodingLeadingZero()
        {
            const string privkey = "91axuYLa8xK796DnBXXsMbjuc8pDYxYgJyQMvFzrZ6UfXaGYuqL";
            var          key     = new DumpedPrivateKey(NetworkParameters.TestNet(), privkey).Key;

            Assert.AreEqual(privkey, key.GetPrivateKeyEncoded(NetworkParameters.TestNet()).ToString());
            Assert.AreEqual(0, key.GetPrivKeyBytes()[0]);
        }
示例#3
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());
 }
示例#4
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());
        }