Class PdfSigGenericPKCS

    • Field Detail

      • hashAlgorithm

        java.lang.String hashAlgorithm
        The hash algorithm, for example "SHA1"
      • provider

        java.lang.String provider
        The crypto provider
      • pkcs

        private PdfPKCS7 pkcs
        The class instance that calculates the PKCS#1 and PKCS#7
      • name

        private java.lang.String name
        The subject name in the signing certificate (the element "CN")
      • externalDigest

        private byte[] externalDigest
      • externalRSAdata

        private byte[] externalRSAdata
      • digestEncryptionAlgorithm

        private java.lang.String digestEncryptionAlgorithm
    • Constructor Detail

      • PdfSigGenericPKCS

        private PdfSigGenericPKCS​(PdfName filter,
                                  PdfName subFilter)
        Creates a generic standard filter.
        Parameters:
        filter - the filter name
        subFilter - the sub-filter name
    • Method Detail

      • setSignInfo

        void setSignInfo​(java.security.PrivateKey privKey,
                         java.security.cert.Certificate[] certChain,
                         java.security.cert.CRL[] crlList)
        Sets the crypto information to sign.
        Parameters:
        privKey - the private key
        certChain - the certificate chain
        crlList - the certificate revocation list. It can be null
      • setExternalDigest

        void setExternalDigest​(byte[] digest,
                               byte[] RSAdata,
                               java.lang.String digestEncryptionAlgorithm)
        Sets the digest/signature to an external calculated value.
        Parameters:
        digest - the digest. This is the actual signature
        RSAdata - the extra data that goes into the data tag in PKCS#7
        digestEncryptionAlgorithm - the encryption algorithm. It may must be null if the digest is also null. If the digest is not null then it may be "RSA" or "DSA"
      • getName

        public java.lang.String getName()
        Gets the subject name in the signing certificate (the element "CN")
        Returns:
        the subject name in the signing certificate (the element "CN")
      • getSigner

        public PdfPKCS7 getSigner()
        Gets the class instance that does the actual signing.
        Returns:
        the class instance that does the actual signing
      • getSignerContents

        public byte[] getSignerContents()
        Gets the signature content. This can be a PKCS#1 or a PKCS#7. It corresponds to the /Contents key.
        Returns:
        the signature content