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 Summary
Constructors Constructor Description PadesSignatureImp(Application application, Signer<CadesInformation> signer, FileToBeSigned<? extends CadesInformation> fileToBeSigned)
Construtor -
Method Summary
Modifier and Type Method Description byte[]
getSavedBuffer()
Retorna os bytes da assinaturavoid
mapCollections(FileToBeSigned<?> fromCollectionOf, FileToBeSigned<?> toCollectionOf)
byte[]
sign(InputStream content)
Realiza a assinatura
-
Constructor Details
-
PadesSignatureImp
public PadesSignatureImp(Application application, Signer<CadesInformation> signer, FileToBeSigned<? extends CadesInformation> fileToBeSigned)Construtor- Parameters:
application
- Applicação do assinadorsigner
- Assinador PAdESfileToBeSigned
- Informações da assinatura Pades/PDF sendo construída
-
-
Method Details
-
sign
Realiza a assinatura- Specified by:
sign
in interfaceorg.apache.pdfbox.pdmodel.interactive.digitalsignature.SignatureInterface
- Parameters:
content
- Stream do documento a ser assinado- Returns:
- Os bytes da assinatura
- Throws:
IOException
-
mapCollections
-
getSavedBuffer
public byte[] getSavedBuffer()Retorna os bytes da assinatura- Returns:
- Os bytes da assinatura
-