Package org.c02e.jpgpj
Class Decryptor.Verifier
java.lang.Object
org.c02e.jpgpj.Decryptor.Verifier
- Enclosing class:
Decryptor
Helper for verifying a given message signature.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected Subkey
Finds verification subkey by ID in this Decryptor's ring, or null.Copy of matched key with signingUid configured and only public subkeys, or null.long
Key ID of signing subkey.boolean
boolean
match
(org.bouncycastle.openpgp.PGPSignature s) Tries to match the specified PGPSignature to this verifier's PGPOnePassSignature (sig1); if found sets sig and returns true.void
setSig
(org.bouncycastle.openpgp.PGPSignature s) void
setSig1
(org.bouncycastle.openpgp.PGPOnePassSignature s) boolean
verify()
True if the signature checks out.
-
Field Details
-
key
-
sig
public org.bouncycastle.openpgp.PGPSignature sig -
sig1
public org.bouncycastle.openpgp.PGPOnePassSignature sig1
-
-
Constructor Details
-
Verifier
public Verifier() -
Verifier
public Verifier(org.bouncycastle.openpgp.PGPSignature s) throws org.bouncycastle.openpgp.PGPException - Throws:
org.bouncycastle.openpgp.PGPException
-
Verifier
public Verifier(org.bouncycastle.openpgp.PGPOnePassSignature s) throws org.bouncycastle.openpgp.PGPException - Throws:
org.bouncycastle.openpgp.PGPException
-
-
Method Details
-
isKeyAvailable
public boolean isKeyAvailable() -
setSig
public void setSig(org.bouncycastle.openpgp.PGPSignature s) throws org.bouncycastle.openpgp.PGPException - Throws:
org.bouncycastle.openpgp.PGPException
-
setSig1
public void setSig1(org.bouncycastle.openpgp.PGPOnePassSignature s) throws org.bouncycastle.openpgp.PGPException - Throws:
org.bouncycastle.openpgp.PGPException
-
match
public boolean match(org.bouncycastle.openpgp.PGPSignature s) Tries to match the specified PGPSignature to this verifier's PGPOnePassSignature (sig1); if found sets sig and returns true. -
verify
public boolean verify() throws org.bouncycastle.openpgp.PGPExceptionTrue if the signature checks out.- Throws:
org.bouncycastle.openpgp.PGPException
-
getSignedBy
Copy of matched key with signingUid configured and only public subkeys, or null.- Throws:
org.bouncycastle.openpgp.PGPException
-
getSignedByKeyId
public long getSignedByKeyId()Key ID of signing subkey. -
findVerificationSubkey
Finds verification subkey by ID in this Decryptor's ring, or null. If found, also sets "key" field to subkey's key.
-