| java.lang.Object org.bouncycastle.cms.CMSEnvelopedGenerator org.bouncycastle.cms.CMSEnvelopedDataStreamGenerator
CMSEnvelopedDataStreamGenerator | public class CMSEnvelopedDataStreamGenerator extends CMSEnvelopedGenerator (Code) | | General class for generating a CMS enveloped-data message stream.
A simple example of usage.
CMSEnvelopedDataStreamGenerator edGen = new CMSEnvelopedDataStreamGenerator();
edGen.addKeyTransRecipient(cert);
ByteArrayOutputStream bOut = new ByteArrayOutputStream();
OutputStream out = edGen.open(
bOut, CMSEnvelopedDataGenerator.AES128_CBC, "BC");*
out.write(data);
out.close();
|
Method Summary | |
protected OutputStream | open(OutputStream out, String encryptionOID, SecretKey encKey, AlgorithmParameters params, ASN1EncodableVector recipientInfos, String provider) | public OutputStream | open(OutputStream out, String encryptionOID, String provider) generate an enveloped object that contains an CMS Enveloped Data
object using the given provider. | public OutputStream | open(OutputStream out, String encryptionOID, int keySize, String provider) generate an enveloped object that contains an CMS Enveloped Data
object using the given provider. | public void | setBEREncodeRecipients(boolean berEncodeRecipientSet) | public void | setBufferSize(int bufferSize) |
CMSEnvelopedDataStreamGenerator | public CMSEnvelopedDataStreamGenerator()(Code) | | base constructor
|
setBEREncodeRecipients | public void setBEREncodeRecipients(boolean berEncodeRecipientSet)(Code) | | Use a BER Set to store the recipient information
|
setBufferSize | public void setBufferSize(int bufferSize)(Code) | | Set the underlying string size for encapsulated data
Parameters: bufferSize - length of octet strings to buffer the data. |
Methods inherited from org.bouncycastle.cms.CMSEnvelopedGenerator | public void addKEKRecipient(SecretKey key, byte[] keyIdentifier)(Code)(Java Doc) public void addKeyAgreementRecipient(String agreementAlgorithm, PrivateKey senderPrivateKey, PublicKey senderPublicKey, X509Certificate recipientCert, String cekWrapAlgorithm, String provider) throws NoSuchProviderException, NoSuchAlgorithmException, InvalidKeyException(Code)(Java Doc) public void addKeyTransRecipient(X509Certificate cert) throws IllegalArgumentException(Code)(Java Doc) public void addKeyTransRecipient(PublicKey key, byte[] subKeyId) throws IllegalArgumentException(Code)(Java Doc) public void addPasswordRecipient(CMSPBEKey pbeKey, String kekAlgorithmOid)(Code)(Java Doc) protected AlgorithmParameters generateParameters(String encryptionOID, SecretKey encKey, String encProvider) throws NoSuchProviderException, CMSException(Code)(Java Doc) protected AlgorithmIdentifier getAlgorithmIdentifier(String encryptionOID, AlgorithmParameters params) throws IOException(Code)(Java Doc)
|
|
|