Class JcaSignerInfoGeneratorBuilder


  • public class JcaSignerInfoGeneratorBuilder
    extends java.lang.Object
    • Constructor Detail

      • JcaSignerInfoGeneratorBuilder

        public JcaSignerInfoGeneratorBuilder​(org.bouncycastle.operator.DigestCalculatorProvider digestProvider)
        Base constructor.
        Parameters:
        digestProvider - a provider of digest calculators for the algorithms required in the signature and attribute calculations.
      • JcaSignerInfoGeneratorBuilder

        public JcaSignerInfoGeneratorBuilder​(org.bouncycastle.operator.DigestCalculatorProvider digestProvider,
                                             CMSSignatureEncryptionAlgorithmFinder sigEncAlgFinder)
        Base constructor with a particular finder for signature algorithms.
        Parameters:
        digestProvider - a provider of digest calculators for the algorithms required in the signature and attribute calculations.
        sigEncAlgFinder - finder for algorithm IDs to store for the signature encryption/signature algorithm field.
    • Method Detail

      • setDirectSignature

        public JcaSignerInfoGeneratorBuilder setDirectSignature​(boolean hasNoSignedAttributes)
        If the passed in flag is true, the signer signature will be based on the data, not a collection of signed attributes, and no signed attributes will be included.
        Returns:
        the builder object
      • build

        public SignerInfoGenerator build​(org.bouncycastle.operator.ContentSigner contentSigner,
                                         X509CertificateHolder certHolder)
                                  throws org.bouncycastle.operator.OperatorCreationException
        Throws:
        org.bouncycastle.operator.OperatorCreationException
      • build

        public SignerInfoGenerator build​(org.bouncycastle.operator.ContentSigner contentSigner,
                                         byte[] keyIdentifier)
                                  throws org.bouncycastle.operator.OperatorCreationException
        Throws:
        org.bouncycastle.operator.OperatorCreationException
      • build

        public SignerInfoGenerator build​(org.bouncycastle.operator.ContentSigner contentSigner,
                                         java.security.cert.X509Certificate certificate)
                                  throws org.bouncycastle.operator.OperatorCreationException,
                                         java.security.cert.CertificateEncodingException
        Throws:
        org.bouncycastle.operator.OperatorCreationException
        java.security.cert.CertificateEncodingException