Package org.c02e.jpgpj
Class Decryptor.Verifier
- java.lang.Object
-
- org.c02e.jpgpj.Decryptor.Verifier
-
- Enclosing class:
- Decryptor
protected class Decryptor.Verifier extends java.lang.Object
Helper for verifying a given message signature.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected Subkey
findVerificationSubkey(java.lang.Long id)
Finds verification subkey by ID in this Decryptor's ring, or null.Key
getSignedBy()
Copy of matched key with signingUid configured and only public subkeys, or null.long
getSignedByKeyId()
Key ID of signing subkey.boolean
isKeyAvailable()
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 Detail
-
key
public Key key
-
sig
public org.bouncycastle.openpgp.PGPSignature sig
-
sig1
public org.bouncycastle.openpgp.PGPOnePassSignature sig1
-
-
Constructor Detail
-
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 Detail
-
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.PGPException
True if the signature checks out.- Throws:
org.bouncycastle.openpgp.PGPException
-
getSignedBy
public Key getSignedBy() throws org.bouncycastle.openpgp.PGPException
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
protected Subkey findVerificationSubkey(java.lang.Long id)
Finds verification subkey by ID in this Decryptor's ring, or null. If found, also sets "key" field to subkey's key.
-
-