JcaSignerInfoGeneratorBuilder (Bouncy Castle Library 1.52 API Specification)
Date: 2015-03-01

org.bouncycastle.cms.jcajce

## Class JcaSignerInfoGeneratorBuilder

- java.lang.Object
- - org.bouncycastle.cms.jcajce.JcaSignerInfoGeneratorBuilder

-     public class JcaSignerInfoGeneratorBuilder
      extends java.lang.Object

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `JcaSignerInfoGeneratorBuilder(DigestCalculatorProvider digestProvider)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `SignerInfoGenerator` | `build(ContentSigner contentSigner, byte[] keyIdentifier)`
    `SignerInfoGenerator` | `build(ContentSigner contentSigner, java.security.cert.X509Certificate certificate)`
    `SignerInfoGenerator` | `build(ContentSigner contentSigner, X509CertificateHolder certHolder)`
    `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.
    `JcaSignerInfoGeneratorBuilder` | `setSignedAttributeGenerator(CMSAttributeTableGenerator signedGen)`
    `JcaSignerInfoGeneratorBuilder` | `setUnsignedAttributeGenerator(CMSAttributeTableGenerator unsignedGen)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### JcaSignerInfoGeneratorBuilder

          public JcaSignerInfoGeneratorBuilder(DigestCalculatorProvider digestProvider)

  - ### 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

    - #### setSignedAttributeGenerator

          public JcaSignerInfoGeneratorBuilder setSignedAttributeGenerator(CMSAttributeTableGenerator signedGen)

    - #### setUnsignedAttributeGenerator

          public JcaSignerInfoGeneratorBuilder setUnsignedAttributeGenerator(CMSAttributeTableGenerator unsignedGen)

    - #### build

          public SignerInfoGenerator build(ContentSigner contentSigner,
                                  X509CertificateHolder certHolder)
                                    throws OperatorCreationException

      Throws:
        `OperatorCreationException`

    - #### build

          public SignerInfoGenerator build(ContentSigner contentSigner,
                                  byte[] keyIdentifier)
                                    throws OperatorCreationException

      Throws:
        `OperatorCreationException`

    - #### build

          public SignerInfoGenerator build(ContentSigner contentSigner,
                                  java.security.cert.X509Certificate certificate)
                                    throws OperatorCreationException,
                                           java.security.cert.CertificateEncodingException

      Throws:
        `OperatorCreationException`
        `java.security.cert.CertificateEncodingException`