Exemple #1
0
        public bool Verify(PgpKey publicKey, Stream stream, bool ignoreTrailingWhitespace = false)
        {
            var helper = new PgpSignatureTransformation(SignatureType, HashAlgorithm, ignoreTrailingWhitespace);

            new CryptoStream(stream, helper, CryptoStreamMode.Read).CopyTo(Stream.Null);
            helper.Finish(sigPck.Version, sigPck.KeyAlgorithm, sigPck.CreationTime, sigPck.GetHashedSubPackets());
            return(publicKey.Verify(helper.Hash !, sigPck.GetSignature(), helper.HashAlgorithm));
        }
Exemple #2
0
 public PgpSignatureSubpacketVector GetHashedSubPackets()
 {
     return(createSubpacketVector(sigPck.GetHashedSubPackets()));
 }
Exemple #3
0
 public void Finish(SignaturePacket sigPck)
 {
     Debug.Assert(sigPck.SignatureType == SignatureType);
     Finish(sigPck.Version, sigPck.KeyAlgorithm, sigPck.CreationTime, sigPck.GetHashedSubPackets());
 }