Top Description Fields Constructors Methods
org.bouncycastle.mail.smime

public Class SMIMEGenerator

extends Object
Class Inheritance
Known Direct Subclasses
org.bouncycastle.mail.smime.SMIMESignedGenerator, org.bouncycastle.mail.smime.SMIMECompressedGenerator, org.bouncycastle.mail.smime.SMIMEEnvelopedGenerator
Imports
java.io.IOException, java.security.NoSuchAlgorithmException, .Provider, java.util.Enumeration, .HashMap, .Map, javax.crypto.KeyGenerator, jakarta.mail.Header, .MessagingException, .Multipart, .Session, jakarta.mail.internet.MimeBodyPart, .MimeMessage, org.bouncycastle.cms.CMSEnvelopedGenerator, org.bouncycastle.util.Strings

super class of the various generators.

Field Summary

Modifier and TypeField and Description
private static Map<K, V>
protected String
protected boolean

Constructor Summary

AccessConstructor and Description
protected
SMIMEGenerator()

base constructor

Method Summary

Modifier and TypeMethod and Description
private KeyGenerator
createKeyGenerator(String algName, Provider provider)

protected KeyGenerator
createSymmetricKeyGenerator(String encryptionOID, Provider provider)

private void
protected MimeBodyPart
makeContentBodyPart(MimeBodyPart content)

Make sure we have a valid content body part - setting the headers with defaults if neccessary.

protected MimeBodyPart
makeContentBodyPart(MimeMessage message)

extract an appropriate body part from the passed in MimeMessage

public void
setContentTransferEncoding(String
the encoding to use, default "base64", use "binary" for a binary encoding.
encoding
)

set the content-transfer-encoding for the CMS block (enveloped data, signature, etc...) in the message.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

BASE_CIPHER_NAMESback to summary
private static Map<K, V> BASE_CIPHER_NAMES
encodingback to summary
protected String encoding
useBase64back to summary
protected boolean useBase64

Constructor Detail

SMIMEGeneratorback to summary
protected SMIMEGenerator()

base constructor

Method Detail

createKeyGeneratorback to summary
private KeyGenerator createKeyGenerator(String algName, Provider provider) throws NoSuchAlgorithmException
createSymmetricKeyGeneratorback to summary
protected KeyGenerator createSymmetricKeyGenerator(String encryptionOID, Provider provider) throws NoSuchAlgorithmException
extractHeadersback to summary
private void extractHeaders(MimeBodyPart content, MimeMessage message) throws MessagingException
makeContentBodyPartback to summary
protected MimeBodyPart makeContentBodyPart(MimeBodyPart content) throws SMIMEException

Make sure we have a valid content body part - setting the headers with defaults if neccessary.

makeContentBodyPartback to summary
protected MimeBodyPart makeContentBodyPart(MimeMessage message) throws SMIMEException

extract an appropriate body part from the passed in MimeMessage

setContentTransferEncodingback to summary
public void setContentTransferEncoding(String encoding)

set the content-transfer-encoding for the CMS block (enveloped data, signature, etc...) in the message.

Parameters
encoding:String

the encoding to use, default "base64", use "binary" for a binary encoding.