Ejemplo n.º 1
0
        private void CreatePrivateKey()
        {
            try
            {
                var password = LocalKeyAccessSingleton.Instance.GetPassword();

                var key = new Key();

                var secret = new BitcoinSecret(key, Network.TestNet);

                var privateKey = secret.PrivateKey.GetWif(Network.TestNet).ToWif();

                var publicKey = secret.PubKey.ToString();

                var encodedPrivateKey = AESHelper.Encrypt128(privateKey, password);

                WalletApiSingleton.Instance.PostClientKeys(publicKey, encodedPrivateKey);

                LocalKeyAccessSingleton.Instance.SetPassword(null);
            }
            catch (Exception ex)
            {
                var a = 234;
            }
        }