|
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.CMSEncryptedDataOutputStream
A CMSEncryptedDataOutputStream writes its output in the form of a CMS encrypted-data structure, encrypting the data in the process.
Specifically, the effect of using this class is as if the following process took place:
encrypted-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 encrypted-data Objects more efficiently (Java VM memory usage) than the CMSEncryptedDataContentInfo class.
CMSOutputStream, CMSEncryptedDataContentInfo, CMSEncryptedDataOutputConnector| Field Summary |
| Fields inherited from class java.io.FilterOutputStream |
out |
| Constructor Summary | |
CMSEncryptedDataOutputStream(CMSOutputConnector conn, SymmetricKey contentEncryptionKey, AlgorithmIdentifier contentEncryptionAlgID, ASN1ObjectID enclosedContentType)Creates a CMSEncryptedDataOutputStream. |
|
CMSEncryptedDataOutputStream(CMSOutputConnector conn, SymmetricKey contentEncryptionKey, AlgorithmIdentifier contentEncryptionAlgID, ASN1ObjectID enclosedContentType, oracle.security.crypto.cert.AttributeSet unprotectedAttributes)Creates a CMSEncryptedDataOutputStream. |
|
CMSEncryptedDataOutputStream(CMSOutputConnector conn, SymmetricKey contentEncryptionKey, AlgorithmIdentifier contentEncryptionAlgID, ASN1ObjectID enclosedContentType, oracle.security.crypto.cert.AttributeSet unprotectedAttributes, boolean writeEncryptedOutput)Creates a CMSEncryptedDataOutputStream. |
|
CMSEncryptedDataOutputStream(java.io.OutputStream out, SymmetricKey contentEncryptionKey, AlgorithmIdentifier contentEncryptionAlgID, ASN1ObjectID enclosedContentType)Creates a CMSEncryptedDataOutputStream. |
|
CMSEncryptedDataOutputStream(java.io.OutputStream out, SymmetricKey contentEncryptionKey, AlgorithmIdentifier contentEncryptionAlgID, ASN1ObjectID enclosedContentType, oracle.security.crypto.cert.AttributeSet unprotectedAttributes)Creates a CMSEncryptedDataOutputStream. |
|
CMSEncryptedDataOutputStream(java.io.OutputStream out, SymmetricKey contentEncryptionKey, AlgorithmIdentifier contentEncryptionAlgID, ASN1ObjectID enclosedContentType, oracle.security.crypto.cert.AttributeSet unprotectedAttributes, boolean writeEncryptedOutput)Creates a CMSEncryptedDataOutputStream. |
|
| Method Summary | |
void |
close() |
ASN1ObjectID |
getExposedContentType()Returns the content type of the data that is output to the underlying output stream. |
void |
terminate()Finish writing the encrypted-data structure to the underlying output stream. |
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 CMSEncryptedDataOutputStream(java.io.OutputStream out,
SymmetricKey contentEncryptionKey,
AlgorithmIdentifier contentEncryptionAlgID,
ASN1ObjectID enclosedContentType)
throws AlgorithmIdentifierException,
InvalidKeyException
CMSEncryptedDataOutputStream.out - The underlying output stream.contentEncryptionKey - The content encryption key.contentEncryptionAlgID - The content encryption algorithm.enclosedContentType - The content type of the enclosed content.AlgorithmIdentifierException - The encryption algorithm is not supported.InvalidKeyException - The encryption key is invalid.
public CMSEncryptedDataOutputStream(java.io.OutputStream out,
SymmetricKey contentEncryptionKey,
AlgorithmIdentifier contentEncryptionAlgID,
ASN1ObjectID enclosedContentType,
oracle.security.crypto.cert.AttributeSet unprotectedAttributes)
throws AlgorithmIdentifierException,
InvalidKeyException
CMSEncryptedDataOutputStream.out - The underlying output stream.contentEncryptionKey - The content encryption key.contentEncryptionAlgID - The content encryption algorithm.enclosedContentType - The content type of the enclosed content.unprotectedAttributes - The set of unprotected attributes.AlgorithmIdentifierException - The encryption algorithm is not supported.InvalidKeyException - The encryption key is invalid.
public CMSEncryptedDataOutputStream(java.io.OutputStream out,
SymmetricKey contentEncryptionKey,
AlgorithmIdentifier contentEncryptionAlgID,
ASN1ObjectID enclosedContentType,
oracle.security.crypto.cert.AttributeSet unprotectedAttributes,
boolean writeEncryptedOutput)
throws AlgorithmIdentifierException,
InvalidKeyException
CMSEncryptedDataOutputStream.out - The underlying output stream.contentEncryptionKey - The content encryption key.contentEncryptionAlgID - The content encryption algorithm.enclosedContentType - The content type of the enclosed content.unprotectedAttributes - The set of unprotected attributes.writeEncryptedOutput - If true the encryptedContent will be written to the output stream; false otherwise.AlgorithmIdentifierException - The encryption algorithm is not supported.InvalidKeyException - The encryption key is invalid.
public CMSEncryptedDataOutputStream(CMSOutputConnector conn,
SymmetricKey contentEncryptionKey,
AlgorithmIdentifier contentEncryptionAlgID,
ASN1ObjectID enclosedContentType)
throws AlgorithmIdentifierException,
InvalidKeyException
CMSEncryptedDataOutputStream.conn - The underlying output connector.contentEncryptionKey - The content encryption key.contentEncryptionAlgID - The content encryption algorithm.enclosedContentType - The content type of the enclosed content.AlgorithmIdentifierException - The encryption algorithm is not supported.InvalidKeyException - The encryption key is invalid.
public CMSEncryptedDataOutputStream(CMSOutputConnector conn,
SymmetricKey contentEncryptionKey,
AlgorithmIdentifier contentEncryptionAlgID,
ASN1ObjectID enclosedContentType,
oracle.security.crypto.cert.AttributeSet unprotectedAttributes)
throws AlgorithmIdentifierException,
InvalidKeyException
CMSEncryptedDataOutputStream.conn - The underlying output connector.contentEncryptionKey - The content encryption key.contentEncryptionAlgID - The content encryption algorithm.enclosedContentType - The content type of the enclosed content.unprotectedAttributes - The set of unprotected attributes.AlgorithmIdentifierException - The encryption algorithm is not supported.InvalidKeyException - The encryption key is invalid.
public CMSEncryptedDataOutputStream(CMSOutputConnector conn,
SymmetricKey contentEncryptionKey,
AlgorithmIdentifier contentEncryptionAlgID,
ASN1ObjectID enclosedContentType,
oracle.security.crypto.cert.AttributeSet unprotectedAttributes,
boolean writeEncryptedOutput)
throws AlgorithmIdentifierException,
InvalidKeyException
CMSEncryptedDataOutputStream.conn - The underlying output connector.contentEncryptionKey - The content encryption key.contentEncryptionAlgID - The content encryption algorithm.enclosedContentType - The content type of the enclosed content.unprotectedAttributes - The set of unprotected attributes.writeEncryptedOutput - If true the encryptedContent will be written to the output stream; false otherwise.AlgorithmIdentifierException - The encryption algorithm is not supported.InvalidKeyException - The encryption key is invalid.| Method Detail |
public void terminate()
throws java.io.IOException
encrypted-data structure to the underlying output stream.
Must be called only after all the enclosed data has been written to this output stream.
terminate in class CMSOutputStreamjava.io.IOException - An I/O error occurred.
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.IOExceptionpublic 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 | ||||||||