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 | Description |
---|---|
CMSEncryptedDataGenerator() |
base constructor
|
Modifier and Type | Method | Description |
---|---|---|
CMSEncryptedData |
generate(CMSTypedData content,
OutputEncryptor contentEncryptor) |
generate an encrypted object that contains an CMS Encrypted Data structure.
|
setUnprotectedAttributeGenerator
public 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