* @return The generated SMIMESignedGenerator.
*/
public SMIMESignedGenerator createGenerator() throws CertStoreException, SMIMEException {
// create the generator for creating an smime/signed message
SMIMESignedGenerator generator = new SMIMESignedGenerator();
// add a signer to the generator - this specifies we are using SHA1
// the encryption algorithm used is taken from the key
generator.addSigner(this.privateKey, this.certificate, SMIMESignedGenerator.DIGEST_SHA1);
// add our pool of certs and cerls (if any) to go with the signature
generator.addCertificatesAndCRLs(this.certStore);
return generator;
}