Class ExternalBlankSignatureContainer

  • All Implemented Interfaces:
    IExternalSignatureContainer

    public class ExternalBlankSignatureContainer
    extends java.lang.Object
    implements IExternalSignatureContainer
    Produces a blank (or empty) signature. Useful for deferred signing with MakeSignature.signExternalContainer().
    • Constructor Detail

      • ExternalBlankSignatureContainer

        public ExternalBlankSignatureContainer​(PdfDictionary sigDic)
        Creates an ExternalBlankSignatureContainer.
        Parameters:
        sigDic - PdfDictionary containing signature iformation. /SubFilter and /Filter aren't set in this constructor.
      • ExternalBlankSignatureContainer

        public ExternalBlankSignatureContainer​(PdfName filter,
                                               PdfName subFilter)
        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 Detail

      • sign

        public byte[] sign​(java.io.InputStream data)
                    throws java.security.GeneralSecurityException
        Description copied from interface: IExternalSignatureContainer
        Produces the container with the signature.
        Specified by:
        sign in interface IExternalSignatureContainer
        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:
        java.security.GeneralSecurityException - the general security exception