Class CleartextSignatureProcessor
- java.lang.Object
-
- org.pgpainless.signature.cleartext_signatures.CleartextSignatureProcessor
-
public class CleartextSignatureProcessor extends java.lang.ObjectProcessor for cleartext-signed messages. Based on Bouncycastle'sClearSignedFileProcessor.
-
-
Constructor Summary
Constructors Constructor Description CleartextSignatureProcessor(java.io.InputStream inputStream, org.bouncycastle.openpgp.PGPPublicKeyRingCollection verificationKeys, MultiPassStrategy multiPassStrategy)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.bouncycastle.openpgp.PGPSignatureprocess()Unpack the message from the ascii armor and process the signature.
-
-
-
Constructor Detail
-
CleartextSignatureProcessor
public CleartextSignatureProcessor(java.io.InputStream inputStream, org.bouncycastle.openpgp.PGPPublicKeyRingCollection verificationKeys, MultiPassStrategy multiPassStrategy) throws java.io.IOException- Throws:
java.io.IOException
-
-
Method Detail
-
process
public org.bouncycastle.openpgp.PGPSignature process() throws java.io.IOException, org.bouncycastle.openpgp.PGPExceptionUnpack the message from the ascii armor and process the signature. This method only returns the signature, if it is correct. After the message has been processed, the content can be retrieved from theMultiPassStrategy. If anInMemoryMultiPassStrategywas used, the message can be accessed viaInMemoryMultiPassStrategy.getBytes(). IfMultiPassStrategy.writeMessageToFile(File)was used, the message content was written to the given file.- Returns:
- validated signature
- Throws:
java.io.IOException- if the signature cannot be read.org.bouncycastle.openpgp.PGPException- if the signature cannot be initialized.SignatureValidationException- if the signature is invalid.
-
-