Package org.bouncycastle.cms.jcajce
Class JcaSignerInfoGeneratorBuilder
java.lang.Object
org.bouncycastle.cms.jcajce.JcaSignerInfoGeneratorBuilder
-
Constructor Summary
ConstructorDescriptionJcaSignerInfoGeneratorBuilder
(DigestCalculatorProvider digestProvider) Base constructor.JcaSignerInfoGeneratorBuilder
(DigestCalculatorProvider digestProvider, CMSSignatureEncryptionAlgorithmFinder sigEncAlgFinder) Base constructor with a particular finder for signature algorithms. -
Method Summary
Modifier and TypeMethodDescriptionbuild
(ContentSigner contentSigner, byte[] keyIdentifier) build
(ContentSigner contentSigner, X509Certificate certificate) build
(ContentSigner contentSigner, X509CertificateHolder certHolder) setContentDigest
(org.bouncycastle.asn1.x509.AlgorithmIdentifier contentDigest) 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.setUnsignedAttributeGenerator
(CMSAttributeTableGenerator unsignedGen)
-
Constructor Details
-
JcaSignerInfoGeneratorBuilder
Base constructor.- Parameters:
digestProvider
- a provider of digest calculators for the algorithms required in the signature and attribute calculations.
-
JcaSignerInfoGeneratorBuilder
public JcaSignerInfoGeneratorBuilder(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 Details
-
setDirectSignature
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
-
setContentDigest
public JcaSignerInfoGeneratorBuilder setContentDigest(org.bouncycastle.asn1.x509.AlgorithmIdentifier contentDigest) -
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, X509Certificate certificate) throws OperatorCreationException, CertificateEncodingException
-