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,
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