Package org.pgpainless.decryption_verification

# 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 class `SignatureVerification.Failure` contains failed verifications.

## Nested Class Summary

Nested Classes
Modifier and Type
Class
Description
`static class`
`SignatureVerification.Failure`
Tuple object of a `SignatureVerification` and the corresponding `SignatureValidationException` 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

Modifier and Type
Method
Description
`org.bouncycastle.openpgp.PGPSignature`
`getSignature()`
Return the `PGPSignature`.
`SubkeyIdentifier`
`getSigningKey()`
Return a `SubkeyIdentifier` of the (sub-) key that is used for signature verification.
`String`
`toString()`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

## Constructor Details

### SignatureVerification

public SignatureVerification(org.bouncycastle.openpgp.PGPSignature signature, @Nullable SubkeyIdentifier signingKey)
Construct a verification tuple.

Parameters:
  `signature` - PGPSignature object
  `signingKey` - identifier of the signing key

## Method Details

### getSignature

public org.bouncycastle.openpgp.PGPSignature getSignature()
Return the `PGPSignature`.

Returns:
  signature

### getSigningKey

@Nullable public SubkeyIdentifier getSigningKey()
Return a `SubkeyIdentifier` of the (sub-) key that is used for signature verification. Note, that this method might return null, e.g. in case of a `SignatureVerification.Failure` due to missing verification key.

Returns:
  verification key identifier

### toString

public String toString()

Overrides:
  `toString` in class `Object`