Class CleartextSignatureProcessor


  • public class CleartextSignatureProcessor
    extends java.lang.Object
    Processor for cleartext-signed messages. Based on Bouncycastle's ClearSignedFileProcessor.
    • 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.PGPSignature process()
      Unpack the message from the ascii armor and process the signature.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 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.PGPException
        Unpack 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 the MultiPassStrategy. If an InMemoryMultiPassStrategy was used, the message can be accessed via InMemoryMultiPassStrategy.getBytes(). If MultiPassStrategy.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.