public class CMSEncryptedDataGenerator extends CMSEncryptedGenerator
CMSTypedData msg = new CMSProcessableByteArray("Hello World!".getBytes());
CMSEncryptedDataGenerator edGen = new CMSEncryptedDataGenerator();
CMSEncryptedData ed = edGen.generate(
msg,
new JceCMSContentEncryptorBuilder(CMSAlgorithm.DES_EDE3_CBC)
.setProvider("BC").build());
unprotectedAttributeGenerator| Constructor and Description |
|---|
CMSEncryptedDataGenerator()
base constructor
|
| Modifier and Type | Method and Description |
|---|---|
CMSEncryptedData |
generate(CMSTypedData content,
org.bouncycastle.operator.OutputEncryptor contentEncryptor)
generate an encrypted object that contains an CMS Encrypted Data structure.
|
setUnprotectedAttributeGeneratorpublic CMSEncryptedData generate(CMSTypedData content, org.bouncycastle.operator.OutputEncryptor contentEncryptor) throws CMSException
content - the content to be encryptedcontentEncryptor - the symmetric key based encryptor to encrypt the content with.CMSException