Exemplo n.º 1
0
        public void Recover_PublicKey_Success()
        {
            var hash      = Hash.FromString("RecoverPublicKey").DumpByteArray();
            var signature = CryptoHelpers.SignWithPrivateKey(_keyPair.PrivateKey,
                                                             Hash.FromString("RecoverPublicKeyFail").DumpByteArray());

            var recoverPublicKey = _bridgeContext.RecoverPublicKey(signature, hash);

            recoverPublicKey.ShouldNotBe(_keyPair.PublicKey);
        }
        public void Recover_Context_PublicKey_Success()
        {
            var recoverPublicKey = _bridgeContext.RecoverPublicKey();

            recoverPublicKey.ShouldNotBeNull();
            recoverPublicKey.ShouldBe(_keyPair.PublicKey);
        }