Class PadesSignatureImp

java.lang.Object
br.ufsc.labsec.signature.conformanceVerifier.pades.PadesSignatureImp
All Implemented Interfaces:
org.apache.pdfbox.pdmodel.interactive.digitalsignature.SignatureInterface

public class PadesSignatureImp
extends Object
implements org.apache.pdfbox.pdmodel.interactive.digitalsignature.SignatureInterface
Esta classe implementa métodos para auxiliar na criação de uma assinatura PAdES.
  • Constructor Details

    • PadesSignatureImp

      public PadesSignatureImp​(Application application, Signer<CadesInformation> signer, FileToBeSigned<? extends CadesInformation> fileToBeSigned)
      Construtor
      Parameters:
      application - Applicação do assinador
      signer - Assinador PAdES
      fileToBeSigned - Informações da assinatura Pades/PDF sendo construída
  • Method Details

    • sign

      public byte[] sign​(InputStream content) throws IOException
      Realiza a assinatura
      Specified by:
      sign in interface org.apache.pdfbox.pdmodel.interactive.digitalsignature.SignatureInterface
      Parameters:
      content - Stream do documento a ser assinado
      Returns:
      Os bytes da assinatura
      Throws:
      IOException
    • mapCollections

      public void mapCollections​(FileToBeSigned<?> fromCollectionOf, FileToBeSigned<?> toCollectionOf)
    • getSavedBuffer

      public byte[] getSavedBuffer()
      Retorna os bytes da assinatura
      Returns:
      Os bytes da assinatura