java.lang.Object | |||
↳ | org.bouncycastle.cms.CMSEnvelopedGenerator | ||
↳ | org.bouncycastle.cms.CMSAuthenticatedGenerator | ||
↳ | org.bouncycastle.cms.CMSAuthenticatedDataStreamGenerator |
General class for generating a CMS authenticated-data message stream.
A simple example of usage.
CMSAuthenticatedDataStreamGenerator edGen = new CMSAuthenticatedDataStreamGenerator(); edGen.addRecipientInfoGenerator(new JceKeyTransRecipientInfoGenerator(cert).setProvider("BC")); ByteArrayOutputStream bOut = new ByteArrayOutputStream(); OutputStream out = edGen.open( bOut, new JceCMSMacCalculatorBuilder(CMSAlgorithm.DES_EDE3_CBC).setProvider("BC").build());* out.write(data); out.close();
[Expand]
Inherited Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
org.bouncycastle.cms.CMSEnvelopedGenerator
|
[Expand]
Inherited Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
org.bouncycastle.cms.CMSAuthenticatedGenerator
| |||||||||||
From class
org.bouncycastle.cms.CMSEnvelopedGenerator
|
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
base constructor
| |||||||||||
This constructor is deprecated.
no longer of any use, use basic constructor.
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
This method is deprecated.
use open(out, MacCalculator)
| |||||||||||
generate an authenticated data structure with the encapsulated bytes marked as type dataType.
| |||||||||||
This method is deprecated.
use open(out, MacCalculator)
| |||||||||||
generate an authenticated data structure with the encapsulated bytes marked as DATA.
| |||||||||||
This method is deprecated.
use open(out, MacCalculator)
| |||||||||||
generate an authenticated data structure with the encapsulated bytes marked as type dataType.
| |||||||||||
This method is deprecated.
use open(out, MacCalculator)
| |||||||||||
Use a BER Set to store the recipient information.
| |||||||||||
Set the underlying string size for encapsulated data
|
Protected Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
This method is deprecated.
No replacement.
| |||||||||||
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
org.bouncycastle.cms.CMSAuthenticatedGenerator
| |||||||||||
From class
org.bouncycastle.cms.CMSEnvelopedGenerator
| |||||||||||
From class
java.lang.Object
|
base constructor
This constructor is deprecated.
no longer of any use, use basic constructor.
constructor allowing specific source of randomness
rand | instance of SecureRandom to use |
---|
This method is deprecated.
use open(out, MacCalculator)
generate an enveloped object that contains an CMS Enveloped Data object using the given provider.
generate an authenticated data structure with the encapsulated bytes marked as type dataType.
dataType | the type of the data been written to the object. |
---|---|
out | the stream to store the authenticated structure in. |
macCalculator | calculator for the MAC to be attached to the data. |
digestCalculator | calculator for computing digest of the encapsulated data. |
CMSException |
---|
This method is deprecated.
use open(out, MacCalculator)
generate an authenticated data structure with the encapsulated bytes marked as DATA.
out | the stream to store the authenticated structure in. |
---|---|
macCalculator | calculator for the MAC to be attached to the data. |
CMSException |
---|
CMSException |
---|
This method is deprecated.
use open(out, MacCalculator)
generate an authenticated object that contains an CMS Authenticated Data object using the given provider.
java.io.IOException | |
CMSException | |
IOException | |
NoSuchAlgorithmException | |
NoSuchProviderException |
generate an authenticated data structure with the encapsulated bytes marked as type dataType.
dataType | the type of the data been written to the object. |
---|---|
out | the stream to store the authenticated structure in. |
macCalculator | calculator for the MAC to be attached to the data. |
CMSException |
---|
This method is deprecated.
use open(out, MacCalculator)
generate an enveloped object that contains an CMS Enveloped Data object using the given provider.
Use a BER Set to store the recipient information. By default recipients are stored in a DER encoding.
useBerEncodingForRecipients | true if a BER set should be used, false if DER. |
---|
Set the underlying string size for encapsulated data
bufferSize | length of octet strings to buffer the data. |
---|