Package com.itextpdf.signatures
Class ExternalBlankSignatureContainer
java.lang.Object
com.itextpdf.signatures.ExternalBlankSignatureContainer
- All Implemented Interfaces:
-
IExternalSignatureContainer
Produces a blank (or empty) signature. Useful for deferred signing with MakeSignature.signExternalContainer().
- Author:
- Paulo Soares
-
Constructor Summary
ConstructorDescriptionCreates an ExternalBlankSignatureContainer.ExternalBlankSignatureContainer
(PdfName filter, PdfName subFilter) Creates an ExternalBlankSignatureContainer. -
Method Summary
Modifier and TypeMethodDescriptionvoid
modifySigningDictionary
(PdfDictionary signDic) Modifies the signature dictionary to suit the container.byte[]
sign
(InputStream data) Produces the container with the signature.
-
Constructor Details
-
ExternalBlankSignatureContainer
Creates an ExternalBlankSignatureContainer.- Parameters:
-
sigDic
- PdfDictionary containing signature iformation. /SubFilter and /Filter aren't set in this constructor.
-
ExternalBlankSignatureContainer
Creates an ExternalBlankSignatureContainer. This constructor will create the PdfDictionary for the signature information and will insert the /Filter and /SubFilter values into this dictionary.- Parameters:
-
filter
- PdfName of the signature handler to use when validating this signature -
subFilter
- PdfName that describes the encoding of the signature
-
-
Method Details
-
sign
Description copied from interface:IExternalSignatureContainer
Produces the container with the signature.- Specified by:
-
sign
in interfaceIExternalSignatureContainer
- Parameters:
-
data
- the data to sign - Returns:
- a container with the signature and other objects, like CRL and OCSP. The container will generally be a PKCS7 one.
- Throws:
-
GeneralSecurityException
- the general security exception
-
modifySigningDictionary
Description copied from interface:IExternalSignatureContainer
Modifies the signature dictionary to suit the container. At least the keysPdfName.Filter
andPdfName.SubFilter
will have to be set.- Specified by:
-
modifySigningDictionary
in interfaceIExternalSignatureContainer
- Parameters:
-
signDic
- the signature dictionary
-