Package org.bouncycastle.mail.smime
Class SMIMEGenerator
- java.lang.Object
-
- org.bouncycastle.mail.smime.SMIMEGenerator
-
- Direct Known Subclasses:
SMIMECompressedGenerator
,SMIMEEnvelopedGenerator
,SMIMESignedGenerator
public class SMIMEGenerator extends java.lang.Object
super class of the various generators.
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
SMIMEGenerator()
base constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected javax.crypto.KeyGenerator
createSymmetricKeyGenerator(java.lang.String encryptionOID, java.security.Provider provider)
protected javax.mail.internet.MimeBodyPart
makeContentBodyPart(javax.mail.internet.MimeBodyPart content)
Make sure we have a valid content body part - setting the headers with defaults if neccessary.protected javax.mail.internet.MimeBodyPart
makeContentBodyPart(javax.mail.internet.MimeMessage message)
extract an appropriate body part from the passed in MimeMessagevoid
setContentTransferEncoding(java.lang.String encoding)
set the content-transfer-encoding for the CMS block (enveloped data, signature, etc...)
-
-
-
Method Detail
-
setContentTransferEncoding
public void setContentTransferEncoding(java.lang.String encoding)
set the content-transfer-encoding for the CMS block (enveloped data, signature, etc...) in the message.- Parameters:
encoding
- the encoding to use, default "base64", use "binary" for a binary encoding.
-
makeContentBodyPart
protected javax.mail.internet.MimeBodyPart makeContentBodyPart(javax.mail.internet.MimeBodyPart content) throws SMIMEException
Make sure we have a valid content body part - setting the headers with defaults if neccessary.- Throws:
SMIMEException
-
makeContentBodyPart
protected javax.mail.internet.MimeBodyPart makeContentBodyPart(javax.mail.internet.MimeMessage message) throws SMIMEException
extract an appropriate body part from the passed in MimeMessage- Throws:
SMIMEException
-
createSymmetricKeyGenerator
protected javax.crypto.KeyGenerator createSymmetricKeyGenerator(java.lang.String encryptionOID, java.security.Provider provider) throws java.security.NoSuchAlgorithmException
- Throws:
java.security.NoSuchAlgorithmException
-
-