Class SignatureVerification
- java.lang.Object
-
- org.pgpainless.decryption_verification.SignatureVerification
-
public class SignatureVerification extends Object
Tuple of a signature and an identifier of its corresponding verification key. Semantic meaning of the signature verification (success, failure) is merely given by context. E.g.OpenPgpMetadata.getVerifiedInbandSignatures()
contains verified verifications, while the classSignatureVerification.Failure
contains failed verifications.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
SignatureVerification.Failure
Tuple object of aSignatureVerification
and the correspondingSignatureValidationException
that caused the verification to fail.
-
Constructor Summary
Constructors Constructor Description SignatureVerification(org.bouncycastle.openpgp.PGPSignature signature, SubkeyIdentifier signingKey)
Construct a verification tuple.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.bouncycastle.openpgp.PGPSignature
getSignature()
Return thePGPSignature
.SubkeyIdentifier
getSigningKey()
Return aSubkeyIdentifier
of the (sub-) key that is used for signature verification.String
toString()
-
-
-
Constructor Detail
-
SignatureVerification
public SignatureVerification(org.bouncycastle.openpgp.PGPSignature signature, @Nullable SubkeyIdentifier signingKey)
Construct a verification tuple.- Parameters:
signature
- PGPSignature objectsigningKey
- identifier of the signing key
-
-
Method Detail
-
getSignature
public org.bouncycastle.openpgp.PGPSignature getSignature()
Return thePGPSignature
.- Returns:
- signature
-
getSigningKey
@Nullable public SubkeyIdentifier getSigningKey()
Return aSubkeyIdentifier
of the (sub-) key that is used for signature verification. Note, that this method might return null, e.g. in case of aSignatureVerification.Failure
due to missing verification key.- Returns:
- verification key identifier
-
-