|
Oracle Security Developer Tools CMS Java API Reference 11g (11.1.1) E10667-02 |
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Object
java.io.OutputStream
java.io.FilterOutputStream
oracle.security.crypto.cms.CMSOutputStream
oracle.security.crypto.cms.CMSEnvelopedDataOutputStream
public class CMSEnvelopedDataOutputStream
A CMSEnvelopedDataOutputStream writes its output in the form of a CMS enveloped-data structure, enveloping the data in the process.
Specifically, the effect of using this class is as if the following process took place:
enveloped-data.except that the actual process is done in one pass, eliminating the necessity to accumulate all of the input data before writing any output.
In the case where a <ocde>CMSConnector is provided instead of a CMSOutputStream, only the exposed content i.e. the Content field of the ContentInfo structure minus the explicit [0] tag is written to the underlying output stream.
IMPORTANT: This class generates large CMS enveloped-data Objects more efficiently (Java VM memory usage) than the CMSEnvelopedDataContentInfo class.
CMSOutputStream, CMSEnvelopedDataContentInfo, CMSEnvelopedDataOutputConnector| Field Summary |
|---|
| Fields inherited from class java.io.FilterOutputStream |
|---|
out |
| Constructor Summary | |
|---|---|
CMSEnvelopedDataOutputStream(CMSOutputConnector conn, oracle.security.crypto.asn1.ASN1ObjectID enclosedContentType, oracle.security.crypto.core.AlgorithmIdentifier contentEncryptionAlgID, java.util.Vector recipients, boolean writeContent)Creates a CMSEnvelopedDataOutputStream. |
|
CMSEnvelopedDataOutputStream(CMSOutputConnector conn, oracle.security.crypto.asn1.ASN1ObjectID enclosedContentType, oracle.security.crypto.core.AlgorithmIdentifier contentEncryptionAlgID, java.util.Vector recipients, boolean writeContent, OriginatorInfo origInfo, oracle.security.crypto.cert.AttributeSet unprotectedAttribs)Creates a CMSEnvelopedDataOutputStream. |
|
CMSEnvelopedDataOutputStream(java.io.OutputStream out, oracle.security.crypto.core.AlgorithmIdentifier contentEncryptionAlgID, java.util.Vector recipients)Creates a CMSEnvelopedDataOutputStream. |
|
CMSEnvelopedDataOutputStream(java.io.OutputStream out, oracle.security.crypto.asn1.ASN1ObjectID enclosedContentType, oracle.security.crypto.core.AlgorithmIdentifier contentEncryptionAlgID, java.util.Vector recipients)Creates a CMSEnvelopedDataOutputStream. |
|
CMSEnvelopedDataOutputStream(java.io.OutputStream out, oracle.security.crypto.asn1.ASN1ObjectID enclosedContentType, oracle.security.crypto.core.AlgorithmIdentifier contentEncryptionAlgID, java.util.Vector recipients, boolean writeContent)Creates a CMSEnvelopedDataOutputStream. |
|
CMSEnvelopedDataOutputStream(java.io.OutputStream out, oracle.security.crypto.asn1.ASN1ObjectID enclosedContentType, oracle.security.crypto.core.AlgorithmIdentifier contentEncryptionAlgID, java.util.Vector recipients, boolean writeContent, OriginatorInfo origInfo, oracle.security.crypto.cert.AttributeSet unprotectedAttribs)Creates a CMSEnvelopedDataOutputStream. |
|
| Method Summary | |
|---|---|
void |
close() |
oracle.security.crypto.asn1.ASN1ObjectID |
getExposedContentType()Returns the content type of the data output to the underlying output stream. |
void |
terminate()Finish writing the enveloped-data structure. |
void |
write(byte[] b, int offset, int len) |
void |
write(int ch) |
| Methods inherited from class java.io.FilterOutputStream |
|---|
flush, write |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public CMSEnvelopedDataOutputStream(java.io.OutputStream out,
oracle.security.crypto.core.AlgorithmIdentifier contentEncryptionAlgID,
java.util.Vector recipients)
throws java.security.NoSuchAlgorithmException
CMSEnvelopedDataOutputStream.
The enclosed content type will be set to Data.
Note the changes in exceptions Exceptions not thrown -- AlgorithmIdentifierException Exceptions introduced -- NoSuchAlgorithmException
out - The output stream.contentEncryptionAlgID - The content encryption algorithm.recipients - The recipients (each element must be an instance of CMSRecipientInfoSpec).java.security.NoSuchAlgorithmException - Unrecognized encryption algorithm.
public CMSEnvelopedDataOutputStream(java.io.OutputStream out,
oracle.security.crypto.asn1.ASN1ObjectID enclosedContentType,
oracle.security.crypto.core.AlgorithmIdentifier contentEncryptionAlgID,
java.util.Vector recipients)
throws java.security.NoSuchAlgorithmException
CMSEnvelopedDataOutputStream.
Note the changes in exceptions Exceptions not thrown -- AlgorithmIdentifierException Exceptions introduced -- NoSuchAlgorithmException
out - The output stream.enclosedContentType - The content type of content being encrypted.contentEncryptionAlgID - The content encryption algorithm.recipients - The recipients (each element must be an instance of CMSRecipientInfoSpec).java.security.NoSuchAlgorithmException - Unrecognized encryption algorithm.
public CMSEnvelopedDataOutputStream(java.io.OutputStream out,
oracle.security.crypto.asn1.ASN1ObjectID enclosedContentType,
oracle.security.crypto.core.AlgorithmIdentifier contentEncryptionAlgID,
java.util.Vector recipients,
boolean writeContent)
throws java.security.NoSuchAlgorithmException
CMSEnvelopedDataOutputStream.
Note the changes in exceptions Exceptions not thrown -- AlgorithmIdentifierException Exceptions introduced -- NoSuchAlgorithmException
out - The output stream.enclosedContentType - The content type of content being encrypted.contentEncryptionAlgID - The content encryption algorithm.recipients - The recipients (each element must be an instance of CMSRecipientInfoSpec).writeContent - Indicates if enclosed content is to be written to the output stream.java.security.NoSuchAlgorithmException - Unrecognized encryption algorithm.
public CMSEnvelopedDataOutputStream(java.io.OutputStream out,
oracle.security.crypto.asn1.ASN1ObjectID enclosedContentType,
oracle.security.crypto.core.AlgorithmIdentifier contentEncryptionAlgID,
java.util.Vector recipients,
boolean writeContent,
OriginatorInfo origInfo,
oracle.security.crypto.cert.AttributeSet unprotectedAttribs)
throws java.security.NoSuchAlgorithmException
CMSEnvelopedDataOutputStream.
Note the changes in exceptions Exceptions not thrown -- AlgorithmIdentifierException Exceptions introduced -- NoSuchAlgorithmException
out - The output stream.enclosedContentType - The content type of content being encrypted.contentEncryptionAlgID - The content encryption algorithm.recipients - The recipients (each element must be an instance of CMSRecipientInfoSpec).writeContent - Indicates if enclosed content is to be written to the output stream.origInfo - The OriginatorInfo.unprotectedAttribs - The unprotected attributes.java.security.NoSuchAlgorithmException - Unrecognized encryption algorithm.
public CMSEnvelopedDataOutputStream(CMSOutputConnector conn,
oracle.security.crypto.asn1.ASN1ObjectID enclosedContentType,
oracle.security.crypto.core.AlgorithmIdentifier contentEncryptionAlgID,
java.util.Vector recipients,
boolean writeContent)
throws java.security.NoSuchAlgorithmException
CMSEnvelopedDataOutputStream.
Note the changes in exceptions Exceptions not thrown -- AlgorithmIdentifierException Exceptions introduced -- NoSuchAlgorithmException
conn - The output connector.contentEncryptionAlgID - The content encryption algorithm.recipients - The recipient certificates (each element must be an instance of CMSRecipientInfoSpec).recipients - The recipients (each element must be an instance of CMSRecipientInfoSpec).writeContent - Indicates if enclosed content is to be written to the output stream.java.security.NoSuchAlgorithmException - Unrecognized encryption algorithm.
public CMSEnvelopedDataOutputStream(CMSOutputConnector conn,
oracle.security.crypto.asn1.ASN1ObjectID enclosedContentType,
oracle.security.crypto.core.AlgorithmIdentifier contentEncryptionAlgID,
java.util.Vector recipients,
boolean writeContent,
OriginatorInfo origInfo,
oracle.security.crypto.cert.AttributeSet unprotectedAttribs)
throws java.security.NoSuchAlgorithmException
CMSEnvelopedDataOutputStream.
Note the changes in exceptions Exceptions not thrown -- AlgorithmIdentifierException Exceptions introduced -- NoSuchAlgorithmException
conn - The output connector.enclosedContentType - The content type of content being encrypted.contentEncryptionAlgID - The content encryption algorithm.recipients - The recipients (each element must be an instance of CMSRecipientInfoSpec).writeContent - Indicates if enclosed content is to be written to the output stream.origInfo - The OriginatorInfo.unprotectedAttribs - The set of unprotected attributes.java.security.NoSuchAlgorithmException - Unrecognized encryption algorithm.| Method Detail |
|---|
public void terminate()
throws java.io.IOException
enveloped-data structure.
This must be called only after all the enclosed data has been written to the output stream.
terminate in class CMSOutputStreamjava.io.IOException - An I/O error occurs.
public void write(int ch)
throws java.io.IOException
write in class java.io.FilterOutputStreamjava.io.IOException
public void write(byte[] b,
int offset,
int len)
throws java.io.IOException
write in class java.io.FilterOutputStreamjava.io.IOException
public void close()
throws java.io.IOException
close in interface java.io.Closeableclose in class java.io.FilterOutputStreamjava.io.IOExceptionpublic oracle.security.crypto.asn1.ASN1ObjectID getExposedContentType()
getExposedContentType in class CMSOutputStream
|
Oracle Security Developer Tools CMS Java API Reference 11g (11.1.1) E10667-02 |
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||