示例#1
0
        public static string GetVakaPublicKey(string privatekey)
        {
            var privateBytes = WifUtility.DecodePrivateWif(privatekey);
            var publicKey    = Secp256K1Manager.GetPublicKey(privateBytes, true);

            return(WifUtility.GetPublicWif(publicKey, "VAKA"));
        }
示例#2
0
        public static KeyPair GenerateKeyPair()
        {
            KeyPair keyPair = new KeyPair();

            byte[] privateKey = Secp256K1Manager.GenerateRandomKey();
            keyPair.PrivateKey = WifUtility.GetPrivateWif(privateKey);
            byte[] publicKey = Secp256K1Manager.GetPublicKey(privateKey, true);
            keyPair.PublicKey = WifUtility.GetPublicWif(publicKey, "VAKA");
            return(keyPair);
        }