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
-
Method Summary
Modifier and TypeMethodDescriptionorg.bouncycastle.cms.SignerInfoGenerator
build
(CAdESSignatureParameters parameters, org.bouncycastle.operator.ContentSigner contentSigner) Builds aSignerInfoGenerator
with no original document providedorg.bouncycastle.cms.SignerInfoGenerator
build
(DSSDocument toSignDocument, CAdESSignatureParameters parameters, org.bouncycastle.operator.ContentSigner contentSigner) Builds aSignerInfoGenerator
for signing atoSignDocument
protected org.bouncycastle.cms.SignerInfoGeneratorBuilder
getSignerInfoGeneratorBuilder
(CAdESSignatureParameters parameters, DSSDocument contentToSign) This method creates a builder of SignerInfoGeneratorprotected 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 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 aSignerInfoGenerator
with no original document provided- Parameters:
parameters
-CAdESSignatureParameters
contentSigner
-ContentSigner
- Returns:
SignerInfoGenerator
-
build
public org.bouncycastle.cms.SignerInfoGenerator build(DSSDocument toSignDocument, CAdESSignatureParameters parameters, org.bouncycastle.operator.ContentSigner contentSigner) Builds aSignerInfoGenerator
for signing atoSignDocument
- Parameters:
toSignDocument
-DSSDocument
to be signedparameters
-CAdESSignatureParameters
contentSigner
-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
-DSSDocument
represents 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
-