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());
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| private CMSEncryptedData | |
| public CMSEncryptedData | generate(CMSTypedData
the content to be encrypted content, OutputEncryptor the symmetric key based encryptor to encrypt the content with. contentEncryptor)generate an encrypted object that contains an CMS Encrypted Data structure. |
| CMSEncryptedDataGenerator | back to summary |
|---|---|
| public CMSEncryptedDataGenerator() base constructor | |
| doGenerate | back to summary |
|---|---|
| private CMSEncryptedData doGenerate(CMSTypedData content, OutputEncryptor contentEncryptor) throws CMSException | |
| generate | back to summary |
|---|---|
| public CMSEncryptedData generate(CMSTypedData content, OutputEncryptor contentEncryptor) throws CMSException generate an encrypted object that contains an CMS Encrypted Data structure.
| |