Top Fields Constructors Methods
org.bouncycastle.cms.jcajce

public Class JcaSignerInfoGeneratorBuilder

extends Object
Class Inheritance
Imports
java.security.cert.CertificateEncodingException, .X509Certificate, org.bouncycastle.asn1.x509.AlgorithmIdentifier, org.bouncycastle.cert.X509CertificateHolder, org.bouncycastle.cert.jcajce.JcaX509CertificateHolder, org.bouncycastle.cms.CMSAttributeTableGenerator, .CMSSignatureEncryptionAlgorithmFinder, .DefaultCMSSignatureEncryptionAlgorithmFinder, .SignerInfoGenerator, .SignerInfoGeneratorBuilder, org.bouncycastle.operator.ContentSigner, .DigestCalculatorProvider, .OperatorCreationException

Field Summary

Modifier and TypeField and Description
private SignerInfoGeneratorBuilder

Constructor Summary

AccessConstructor and Description
public
JcaSignerInfoGeneratorBuilder(DigestCalculatorProvider
a provider of digest calculators for the algorithms required in the signature and attribute calculations.
digestProvider
)

Base constructor.

public
JcaSignerInfoGeneratorBuilder(DigestCalculatorProvider
a provider of digest calculators for the algorithms required in the signature and attribute calculations.
digestProvider
,
CMSSignatureEncryptionAlgorithmFinder
finder for algorithm IDs to store for the signature encryption/signature algorithm field.
sigEncAlgFinder
)

Base constructor with a particular finder for signature algorithms.

Method Summary

Modifier and TypeMethod and Description
public SignerInfoGenerator
build(ContentSigner contentSigner, X509CertificateHolder certHolder)

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

public SignerInfoGenerator
build(ContentSigner contentSigner, X509Certificate certificate)

public JcaSignerInfoGeneratorBuilder
public JcaSignerInfoGeneratorBuilder

Returns:

the builder object
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.

public JcaSignerInfoGeneratorBuilder
public JcaSignerInfoGeneratorBuilder
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

builderback to summary
private SignerInfoGeneratorBuilder builder

Constructor Detail

JcaSignerInfoGeneratorBuilderback to summary
public JcaSignerInfoGeneratorBuilder(DigestCalculatorProvider digestProvider)

Base constructor.

Parameters
digestProvider:DigestCalculatorProvider

a provider of digest calculators for the algorithms required in the signature and attribute calculations.

JcaSignerInfoGeneratorBuilderback to summary
public JcaSignerInfoGeneratorBuilder(DigestCalculatorProvider digestProvider, CMSSignatureEncryptionAlgorithmFinder sigEncAlgFinder)

Base constructor with a particular finder for signature algorithms.

Parameters
digestProvider:DigestCalculatorProvider

a provider of digest calculators for the algorithms required in the signature and attribute calculations.

sigEncAlgFinder:CMSSignatureEncryptionAlgorithmFinder

finder for algorithm IDs to store for the signature encryption/signature algorithm field.

Method Detail

buildback to summary
public SignerInfoGenerator build(ContentSigner contentSigner, X509CertificateHolder certHolder) throws OperatorCreationException
buildback to summary
public SignerInfoGenerator build(ContentSigner contentSigner, byte[] keyIdentifier) throws OperatorCreationException
buildback to summary
public SignerInfoGenerator build(ContentSigner contentSigner, X509Certificate certificate) throws OperatorCreationException, CertificateEncodingException
setContentDigestback to summary
public JcaSignerInfoGeneratorBuilder setContentDigest(AlgorithmIdentifier contentDigest)
setDirectSignatureback to summary
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:JcaSignerInfoGeneratorBuilder

the builder object

setSignedAttributeGeneratorback to summary
public JcaSignerInfoGeneratorBuilder setSignedAttributeGenerator(CMSAttributeTableGenerator signedGen)
setUnsignedAttributeGeneratorback to summary
public JcaSignerInfoGeneratorBuilder setUnsignedAttributeGenerator(CMSAttributeTableGenerator unsignedGen)