Class DefaultPDFSignatureContextFactory

java.lang.Object
se.swedenconnect.sigval.pdf.pdfstruct.impl.DefaultPDFSignatureContextFactory
All Implemented Interfaces:
PDFSignatureContextFactory

public class DefaultPDFSignatureContextFactory extends Object implements PDFSignatureContextFactory
Default implementation of the PDFSignatureContextFactory providing a base PDF signature context for signed PDF documents to determine whether updates to a PDF document after it was signed can be considered safe with respect to visual content.
Author:
Martin Lindström (martin@idsec.se), Stefan Santesson (stefan@idsec.se)
  • Constructor Details

    • DefaultPDFSignatureContextFactory

      public DefaultPDFSignatureContextFactory()
  • Method Details

    • getPdfSignatureContext

      public PDFSignatureContext getPdfSignatureContext(byte[] pdfDocument) throws IOException
      Provide a PDF signature context object for a particular PDF document. This signature context object can be used to determine signature validity and whether a signature in the document covers the whole document.
      Specified by:
      getPdfSignatureContext in interface PDFSignatureContextFactory
      Parameters:
      pdfDocument - the target PDF document
      Returns:
      an implementatioin of the PDFSignatureContext interface
      Throws:
      IOException - error parsing the provided PDF document