Ejemplo n.º 1
0
        public bool Verify(ICoin coin)
        {
            // Verify that the coin has a valid signature using our public key.
            byte[] id        = coin.GetID();
            byte[] signature = coin.GetSignature();

            PssSigner signer = new PssSigner(new RsaEngine(), new Sha1Digest(), 20);

            signer.Init(false, keys.Public);

            signer.BlockUpdate(id, 0, id.Length);

            return(signer.VerifySignature(signature));
        }