|
Oracle Security Developer Tools CMS Java API Reference 10g Release 2 (10.1.2.0.2) B15564-01 |
||||||||
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
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, ASN1ObjectID enclosedContentType, AlgorithmIdentifier contentEncryptionAlgID, java.util.Vector recipients, boolean writeContent) Creates a CMSEnvelopedDataOutputStream . |
|
CMSEnvelopedDataOutputStream(CMSOutputConnector conn, ASN1ObjectID enclosedContentType, AlgorithmIdentifier contentEncryptionAlgID, java.util.Vector recipients, boolean writeContent, OriginatorInfo origInfo, oracle.security.crypto.cert.AttributeSet unprotectedAttribs) Creates a CMSEnvelopedDataOutputStream . |
|
CMSEnvelopedDataOutputStream(java.io.OutputStream out, AlgorithmIdentifier contentEncryptionAlgID, java.util.Vector recipients) Creates a CMSEnvelopedDataOutputStream . |
|
CMSEnvelopedDataOutputStream(java.io.OutputStream out, ASN1ObjectID enclosedContentType, AlgorithmIdentifier contentEncryptionAlgID, java.util.Vector recipients) Creates a CMSEnvelopedDataOutputStream . |
|
CMSEnvelopedDataOutputStream(java.io.OutputStream out, ASN1ObjectID enclosedContentType, AlgorithmIdentifier contentEncryptionAlgID, java.util.Vector recipients, boolean writeContent) Creates a CMSEnvelopedDataOutputStream . |
|
CMSEnvelopedDataOutputStream(java.io.OutputStream out, ASN1ObjectID enclosedContentType, AlgorithmIdentifier contentEncryptionAlgID, java.util.Vector recipients, boolean writeContent, OriginatorInfo origInfo, oracle.security.crypto.cert.AttributeSet unprotectedAttribs) Creates a CMSEnvelopedDataOutputStream . |
Method Summary | |
void |
close() |
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, AlgorithmIdentifier contentEncryptionAlgID, java.util.Vector recipients) throws AlgorithmIdentifierException
CMSEnvelopedDataOutputStream
.
The enclosed content type will be set to Data
.
out
- The output stream.contentEncryptionAlgID
- The content encryption algorithm.recipients
- The recipients (each element must be an instance of CMSRecipientInfoSpec
).AlgorithmIdentifierException
- Unrecognized encryption algorithm.public CMSEnvelopedDataOutputStream(java.io.OutputStream out, ASN1ObjectID enclosedContentType, AlgorithmIdentifier contentEncryptionAlgID, java.util.Vector recipients) throws AlgorithmIdentifierException
CMSEnvelopedDataOutputStream
.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
).AlgorithmIdentifierException
- Unrecognized encryption algorithm.public CMSEnvelopedDataOutputStream(java.io.OutputStream out, ASN1ObjectID enclosedContentType, AlgorithmIdentifier contentEncryptionAlgID, java.util.Vector recipients, boolean writeContent) throws AlgorithmIdentifierException
CMSEnvelopedDataOutputStream
.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.AlgorithmIdentifierException
- Unrecognized encryption algorithm.public CMSEnvelopedDataOutputStream(java.io.OutputStream out, ASN1ObjectID enclosedContentType, AlgorithmIdentifier contentEncryptionAlgID, java.util.Vector recipients, boolean writeContent, OriginatorInfo origInfo, oracle.security.crypto.cert.AttributeSet unprotectedAttribs) throws AlgorithmIdentifierException
CMSEnvelopedDataOutputStream
.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.AlgorithmIdentifierException
- Unrecognized encryption algorithm.public CMSEnvelopedDataOutputStream(CMSOutputConnector conn, ASN1ObjectID enclosedContentType, AlgorithmIdentifier contentEncryptionAlgID, java.util.Vector recipients, boolean writeContent) throws AlgorithmIdentifierException
CMSEnvelopedDataOutputStream
.conn
- The output connector.contentEncryptionAlgID
- The content encryption algorithm.recipients
- The recipient certificates (each element must be an instance of CMSRecipientInfoSpec
).writeContent
- Indicates if enclosed content is to be written to the output stream.AlgorithmIdentifierException
- Unrecognized encryption algorithm.public CMSEnvelopedDataOutputStream(CMSOutputConnector conn, ASN1ObjectID enclosedContentType, AlgorithmIdentifier contentEncryptionAlgID, java.util.Vector recipients, boolean writeContent, OriginatorInfo origInfo, oracle.security.crypto.cert.AttributeSet unprotectedAttribs) throws AlgorithmIdentifierException
CMSEnvelopedDataOutputStream
.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.AlgorithmIdentifierException
- 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 CMSOutputStream
java.io.IOException
- An I/O error occurs.public void write(int ch) throws java.io.IOException
java.io.IOException
public void write(byte[] b, int offset, int len) throws java.io.IOException
java.io.IOException
public void close() throws java.io.IOException
java.io.IOException
public ASN1ObjectID getExposedContentType()
getExposedContentType
in class CMSOutputStream
|
Oracle Security Developer Tools CMS Java API Reference 10g Release 2 (10.1.2.0.2) B15564-01 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |