Class OpenPGPDetachedSignatureProcessor

java.lang.Object
org.bouncycastle.openpgp.api.OpenPGPDetachedSignatureProcessor

public class OpenPGPDetachedSignatureProcessor extends Object
High-Level Processor for Messages Signed Using Detached OpenPGP Signatures.

To use this class, first instantiate the processor, optionally passing in a concrete OpenPGPImplementation and OpenPGPPolicy. Then, pass in any detached signatures you want to verify using addSignatures(InputStream). Next, provide the expected issuers OpenPGPCertificates for signature verification using addVerificationCertificate(OpenPGPCertificate). Signatures for which no certificate was provided, and certificates for which no signature was added, are ignored. Optionally, you can specify a validity date range for the signatures using verifyNotBefore(Date) and verifyNotAfter(Date). Signatures outside this range will be ignored as invalid. Lastly, provide an InputStream containing the original plaintext data, over which you want to verify the detached signatures using process(InputStream). As a result you will receive a list containing all processed OpenPGPDocumentSignatures. For these, you can check validity by calling OpenPGPSignature.OpenPGPDocumentSignature.isValid().