예제 #1
0
        public static void EncryptTest1()
        {
            string password = "******";
            var    wif      = "L44B5gGEpqEDRS9vVPz7QT35jcBG2r3CZwSwQ4fCewXAhAhqGVpP";

            var wifBytes     = Wallet.GetPrivateKeyFromWif(wif);
            var wifHexString = wifBytes.ToHexString().ToUpper();

            var encrypted = Nep2.Encrypt(wif, password, ScryptParameters.Default).Result;

            Assert.Equal("CBF4B9F70470856BB4F40F80B87EDB90865997FFEE6DF315AB166D713AF433A5", wifHexString);
            Assert.Equal("6PYVPVe1fQznphjbUxXP9KZJqPMVnVwCx5s5pr5axRJ8uHkMtZg97eT5kL", encrypted);
        }
예제 #2
0
        public static void EncryptTest2()
        {
            string password = "******";
            var    wif      = "KwYgW8gcxj1JWJXhPSu4Fqwzfhp5Yfi42mdYmMa4XqK7NJxXUSK7";

            var wifBytes     = Wallet.GetPrivateKeyFromWif(wif);
            var wifHexString = wifBytes.ToHexString().ToUpper();

            var encrypted = Nep2.Encrypt(wif, password, ScryptParameters.Default).Result;

            Assert.Equal("09C2686880095B1A4C249EE3AC4EEA8A014F11E6F986D0B5025AC1F39AFBD9AE", wifHexString);
            Assert.Equal("6PYN6mjwYfjPUuYT3Exajvx25UddFVLpCw4bMsmtLdnKwZ9t1Mi3CfKe8S", encrypted);
        }