Class JcaSimpleSignerInfoGeneratorBuilder

java.lang.Object
org.bouncycastle.cms.jcajce.JcaSimpleSignerInfoGeneratorBuilder

public class JcaSimpleSignerInfoGeneratorBuilder extends Object
Use this class if you are using a provider that has all the facilities you need.

For example:

      CMSSignedDataGenerator gen = new CMSSignedDataGenerator();
      ContentSigner sha1Signer = new JcaContentSignerBuilder("SHA1withRSA").setProvider("BC").build(signKP.getPrivate());

      gen.addSignerInfoGenerator(
                new JcaSignerInfoGeneratorBuilder(
                     new JcaDigestCalculatorProviderBuilder().setProvider("BC").build())
                     .build(sha1Signer, signCert));
 
becomes:
      CMSSignedDataGenerator gen = new CMSSignedDataGenerator();

      gen.addSignerInfoGenerator(
                new JcaSimpleSignerInfoGeneratorBuilder()
                     .setProvider("BC")
                     .build("SHA1withRSA", signKP.getPrivate(), signCert));