Esempio n. 1
0
        public void TestRecoverAddressTest()
        {
            var priKey     = "0xdce1443bd2ef0c2631adc1c67e5c93f13dc23a41c18b536effbbdcbcdb96fb65".ToBytes();
            var vechainKey = new SimpleWallet(priKey);

            var msgHash = Keccack256.CalculateHash("hello world");

            var signature = Secp256k1.Sign(msgHash, priKey);

            var recoverAddress = SimpleWallet.RecoverAddress(msgHash, signature);

            Assert.True(recoverAddress == "0x7567d83b7b8d80addcb281a71d54fc7b3364ffed");
        }