Exemplo n.º 1
0
        public bool Verify(
            HashDigest <T> messageHash,
            byte[] signature,
            PublicKey publicKey)
        {
            lock (_instanceLock)
            {
                var secp256K1Signature = new byte[64];
                _instance.SignatureParseDer(secp256K1Signature, signature);

                byte[] secp256K1PublicKey  = new byte[64];
                byte[] serializedPublicKey = publicKey.Format(false);
                _instance.PublicKeyParse(secp256K1PublicKey, serializedPublicKey);

                return(_instance.Verify(secp256K1Signature, messageHash.ToByteArray(), secp256K1PublicKey));
            }
        }