java.lang.Object | ||
↳ | org.bouncycastle.mail.smime.SMIMEGenerator | |
↳ | org.bouncycastle.mail.smime.SMIMEEnvelopedGenerator |
General class for generating a pkcs7-mime message. A simple example of usage.
SMIMEEnvelopedGenerator fact = new SMIMEEnvelopedGenerator(); fact.addRecipientInfoGenerator(new JceKeyTransRecipientInfoGenerator(recipientCert).setProvider("BC")); MimeBodyPart mp = fact.generate(content, new JceCMSContentEncryptorBuilder(CMSAlgorithm.RC2_CBC, 40).setProvider("BC").build());Note: Most clients expect the MimeBodyPart to be in a MimeMultipart when it's sent.
Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
String | CAST5_CBC | ||||||||||
String | IDEA_CBC |
Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
AES128_CBC | |||||||||||
AES128_WRAP | |||||||||||
AES192_CBC | |||||||||||
AES256_CBC | |||||||||||
AES256_WRAP | |||||||||||
CAMELLIA128_CBC | |||||||||||
CAMELLIA128_WRAP | |||||||||||
CAMELLIA192_CBC | |||||||||||
CAMELLIA192_WRAP | |||||||||||
CAMELLIA256_CBC | |||||||||||
CAMELLIA256_WRAP | |||||||||||
DES_EDE3_CBC | |||||||||||
DES_EDE3_WRAP | |||||||||||
ECDH_SHA1KDF | |||||||||||
RC2_CBC | |||||||||||
SEED_CBC | |||||||||||
SEED_WRAP |
[Expand]
Inherited Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
org.bouncycastle.mail.smime.SMIMEGenerator
|
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
base constructor
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
This method is deprecated.
use addRecipientInfoGenerator()
| |||||||||||
This method is deprecated.
use addRecipientInfoGenerator()
| |||||||||||
This method is deprecated.
use addRecipientInfoGenerator()
| |||||||||||
This method is deprecated.
use addRecipientInfoGenerator()
| |||||||||||
This method is deprecated.
use addRecipientInfoGenerator()
| |||||||||||
add a recipientInfoGenerator.
| |||||||||||
This method is deprecated.
No replacement.
| |||||||||||
This method is deprecated.
No replacement.
| |||||||||||
generate an enveloped object that contains an SMIME Enveloped
object using the given content encryptor
| |||||||||||
This method is deprecated.
No replacement.
| |||||||||||
This method is deprecated.
No replacement.
| |||||||||||
This method is deprecated.
No replacement.
| |||||||||||
This method is deprecated.
No replacement.
| |||||||||||
generate an enveloped object that contains an SMIME Enveloped
object using the given provider from the contents of the passed in
message
| |||||||||||
This method is deprecated.
No replacement.
| |||||||||||
This method is deprecated.
No replacement.
| |||||||||||
Use a BER Set to store the recipient information
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
org.bouncycastle.mail.smime.SMIMEGenerator
| |||||||||||
From class
java.lang.Object
|
base constructor
This method is deprecated.
use addRecipientInfoGenerator()
add a KEK recipient.
IllegalArgumentException |
---|
This method is deprecated.
use addRecipientInfoGenerator()
Add a key agreement based recipient.
senderPrivateKey | private key to initialise sender side of agreement with. |
---|---|
senderPublicKey | sender public key to include with message. |
recipientCert | recipient's public key certificate. |
cekWrapAlgorithm | OID for key wrapping algorithm to use. |
provider | provider to use for the agreement calculation. |
This method is deprecated.
use addRecipientInfoGenerator()
Add a key agreement based recipient.
senderPrivateKey | private key to initialise sender side of agreement with. |
---|---|
senderPublicKey | sender public key to include with message. |
recipientCert | recipient's public key certificate. |
cekWrapAlgorithm | OID for key wrapping algorithm to use. |
provider | provider to use for the agreement calculation. |
This method is deprecated.
use addRecipientInfoGenerator()
add a recipient - note: this will only work on V3 and later clients.
key | the recipient's public key |
---|---|
subKeyId | the subject key id for the recipient's public key |
IllegalArgumentException |
---|
This method is deprecated.
use addRecipientInfoGenerator()
add a recipient.
IllegalArgumentException |
---|
add a recipientInfoGenerator.
IllegalArgumentException |
---|
This method is deprecated.
No replacement.
generate an enveloped object that contains an SMIME Enveloped object using the given provider from the contents of the passed in message
This method is deprecated.
No replacement.
generate an enveloped object that contains an SMIME Enveloped object using the given provider. The size of the encryption key is determined by keysize.
generate an enveloped object that contains an SMIME Enveloped object using the given content encryptor
SMIMEException |
---|
This method is deprecated.
No replacement.
generate an enveloped object that contains an SMIME Enveloped object using the given provider.
This method is deprecated.
No replacement.
generate an enveloped object that contains an SMIME Enveloped object using the given provider.
This method is deprecated.
No replacement.
generate an enveloped object that contains an SMIME Enveloped object using the given provider from the contents of the passed in message. The size of the encryption key used to protect the message is determined by keysize.
This method is deprecated.
No replacement.
generate an enveloped object that contains an SMIME Enveloped object using the given provider from the contents of the passed in message
generate an enveloped object that contains an SMIME Enveloped object using the given provider from the contents of the passed in message
SMIMEException |
---|
This method is deprecated.
No replacement.
generate an enveloped object that contains an SMIME Enveloped object using the given provider from the contents of the passed in message. The size of the encryption key used to protect the message is determined by keysize.
This method is deprecated.
No replacement.
generate an enveloped object that contains an SMIME Enveloped object using the given provider. The size of the encryption key is determined by keysize.
Use a BER Set to store the recipient information