public class CMSEncryptedDataGenerator extends CMSEncryptedGenerator
CMSTypedData msg = new CMSProcessableByteArray("Hello World!".getBytes());
CMSEncryptedDataGenerator edGen = new CMSEnvelopedDataGenerator();
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,
OutputEncryptor contentEncryptor)
generate an encrypted object that contains an CMS Encrypted Data structure.
|
setUnprotectedAttributeGeneratorpublic CMSEncryptedData generate(CMSTypedData content, OutputEncryptor contentEncryptor) throws CMSException
content - the content to be encryptedcontentEncryptor - the symmetric key based encryptor to encrypt the content with.CMSException