Class CMSSignerInfoGeneratorBuilder
java.lang.Object
eu.europa.esig.dss.cades.signature.CMSSignerInfoGeneratorBuilder
This class is used to build an instance of
org.bouncycastle.cms.SignerInfoGenerator-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.bouncycastle.cms.SignerInfoGeneratorbuild(CAdESSignatureParameters parameters, org.bouncycastle.operator.ContentSigner contentSigner) Builds aSignerInfoGeneratorwith no original document providedorg.bouncycastle.cms.SignerInfoGeneratorbuild(DSSDocument toSignDocument, CAdESSignatureParameters parameters, org.bouncycastle.operator.ContentSigner contentSigner) Builds aSignerInfoGeneratorfor signing atoSignDocumentprotected org.bouncycastle.cms.SignerInfoGeneratorBuildergetSignerInfoGeneratorBuilder(CAdESSignatureParameters parameters, DSSDocument contentToSign) This method creates a builder of SignerInfoGeneratorprotected org.bouncycastle.cms.SignerInfoGeneratorBuildergetSignerInfoGeneratorBuilder(org.bouncycastle.operator.DigestCalculatorProvider digestCalculatorProvider, org.bouncycastle.asn1.cms.AttributeTable signedAttributes, org.bouncycastle.asn1.cms.AttributeTable unsignedAttributes) This method creates a builder of SignerInfoGeneratorsetIncludeUnsignedAttributes(boolean includeUnsignedAttributes) Sets whether the unsigned attributes should be included into the generated SignerInfoGenerator
-
Constructor Details
-
CMSSignerInfoGeneratorBuilder
public CMSSignerInfoGeneratorBuilder()Default constructor
-
-
Method Details
-
setIncludeUnsignedAttributes
public CMSSignerInfoGeneratorBuilder setIncludeUnsignedAttributes(boolean includeUnsignedAttributes) Sets whether the unsigned attributes should be included into the generated SignerInfoGenerator- Parameters:
includeUnsignedAttributes- whether the unsigned attributes should be included- Returns:
- this
-
build
public org.bouncycastle.cms.SignerInfoGenerator build(CAdESSignatureParameters parameters, org.bouncycastle.operator.ContentSigner contentSigner) Builds aSignerInfoGeneratorwith no original document provided- Parameters:
parameters-CAdESSignatureParameterscontentSigner-ContentSigner- Returns:
SignerInfoGenerator
-
build
public org.bouncycastle.cms.SignerInfoGenerator build(DSSDocument toSignDocument, CAdESSignatureParameters parameters, org.bouncycastle.operator.ContentSigner contentSigner) Builds aSignerInfoGeneratorfor signing atoSignDocument- Parameters:
toSignDocument-DSSDocumentto be signedparameters-CAdESSignatureParameterscontentSigner-ContentSigner- Returns:
SignerInfoGenerator
-
getSignerInfoGeneratorBuilder
protected org.bouncycastle.cms.SignerInfoGeneratorBuilder getSignerInfoGeneratorBuilder(CAdESSignatureParameters parameters, DSSDocument contentToSign) This method creates a builder of SignerInfoGenerator- Parameters:
parameters- the parameters of the signature containing values for the attributescontentToSign-DSSDocumentrepresents a content to be signed- Returns:
- a SignerInfoGeneratorBuilder that generate the signed and unsigned attributes according to the CAdESLevelBaselineB
-
getSignerInfoGeneratorBuilder
protected org.bouncycastle.cms.SignerInfoGeneratorBuilder getSignerInfoGeneratorBuilder(org.bouncycastle.operator.DigestCalculatorProvider digestCalculatorProvider, org.bouncycastle.asn1.cms.AttributeTable signedAttributes, org.bouncycastle.asn1.cms.AttributeTable unsignedAttributes) This method creates a builder of SignerInfoGenerator- Parameters:
digestCalculatorProvider- the digest calculator (can be pre-computed)signedAttributes- the signedAttributesunsignedAttributes- the unsignedAttributes- Returns:
- a SignerInfoGeneratorBuilder that generate the signed and unsigned attributes according to the parameters
-