Package org.bouncycastle.mail.smime

Examples of org.bouncycastle.mail.smime.SMIMESignedGenerator$ContentSigner


     * @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;
       
    }
View Full Code Here


     */   
    public MimeMultipart generate(MimeMessage message) throws CertStoreException,
    NoSuchAlgorithmException, NoSuchProviderException, SMIMEException {
       
        // create the generator for creating an smime/signed MimeMultipart
        SMIMESignedGenerator generator = createGenerator();
       
        // do it
        return generator.generate(message, "BC");
       
    }
View Full Code Here

     */   
    public MimeMultipart generate(MimeBodyPart content) throws CertStoreException,
    NoSuchAlgorithmException, NoSuchProviderException, SMIMEException {
       
        // create the generator for creating an smime/signed MimeMultipart
        SMIMESignedGenerator generator = createGenerator();
       
        // do it
        return generator.generate(content, "BC");
       
    }
View Full Code Here

     * @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;
       
    }
View Full Code Here

     */   
    public MimeMultipart generate(MimeMessage message) throws CertStoreException,
    NoSuchAlgorithmException, NoSuchProviderException, SMIMEException {
       
        // create the generator for creating an smime/signed MimeMultipart
        SMIMESignedGenerator generator = createGenerator();
       
        // do it
        return generator.generate(message, "BC");
       
    }
View Full Code Here

     */   
    public MimeMultipart generate(MimeBodyPart content) throws CertStoreException,
    NoSuchAlgorithmException, NoSuchProviderException, SMIMEException {
       
        // create the generator for creating an smime/signed MimeMultipart
        SMIMESignedGenerator generator = createGenerator();
       
        // do it
        return generator.generate(content, "BC");
       
    }
View Full Code Here

     * @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;
       
    }
View Full Code Here

     */   
    public MimeMultipart generate(MimeMessage message) throws CertStoreException,
    NoSuchAlgorithmException, NoSuchProviderException, SMIMEException {
       
        // create the generator for creating an smime/signed MimeMultipart
        SMIMESignedGenerator generator = createGenerator();
       
        // do it
        return generator.generate(message, "BC");
       
    }
View Full Code Here

     */   
    public MimeMultipart generate(MimeBodyPart content) throws CertStoreException,
    NoSuchAlgorithmException, NoSuchProviderException, SMIMEException {
       
        // create the generator for creating an smime/signed MimeMultipart
        SMIMESignedGenerator generator = createGenerator();
       
        // do it
        return generator.generate(content, "BC");
       
    }
View Full Code Here

     * @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;
       
    }
View Full Code Here

TOP

Related Classes of org.bouncycastle.mail.smime.SMIMESignedGenerator$ContentSigner

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.