Skip navigation links

Oracle Fusion Middleware CMS Java API Reference for Oracle Security Developer Tools
11g Release 1 (11.1.1)

E10667-04


oracle.security.crypto.cms
Class CMSEncryptedDataOutputConnector

java.lang.Object
  extended by oracle.security.crypto.cms.CMSEncryptedDataOutputConnector

All Implemented Interfaces:
CMSOutputConnector

public class CMSEncryptedDataOutputConnector
extends java.lang.Object
implements CMSOutputConnector

A CMSEncryptedDataOutputConnector is used in place of a CMSEncryptedDataOutputStream when constructing nested CMS objects containing encrypted-data structures.

A CMSEncryptedDataOutputConnector is essentially an output stream filter that wraps the data written to it within a CMS encrypted-data structure. Only the Content field of the CMS ContentInfo structure minus the the explicit [0] tag wrapper is written to the underlying output stream.

See Also:
CMSOutputConnector, CMSEncryptedDataOutputStream

Constructor Summary
CMSEncryptedDataOutputConnector(CMSOutputConnector conn, javax.crypto.SecretKey contentEncryptionKey, oracle.security.crypto.core.AlgorithmIdentifier contentEncryptionAlgID, oracle.security.crypto.asn1.ASN1ObjectID enclosedContentType)
          Creates a CMSEncryptedDataOutputConnector.
CMSEncryptedDataOutputConnector(CMSOutputConnector conn, javax.crypto.SecretKey contentEncryptionKey, oracle.security.crypto.core.AlgorithmIdentifier contentEncryptionAlgID, oracle.security.crypto.asn1.ASN1ObjectID enclosedContentType, oracle.security.crypto.cert.AttributeSet unprotectedAttributes)
          Creates a CMSEncryptedDataOutputConnector.
CMSEncryptedDataOutputConnector(CMSOutputConnector conn, javax.crypto.SecretKey contentEncryptionKey, oracle.security.crypto.core.AlgorithmIdentifier contentEncryptionAlgID, oracle.security.crypto.asn1.ASN1ObjectID enclosedContentType, oracle.security.crypto.cert.AttributeSet unprotectedAttributes, boolean writeEncryptedOutput)
          Creates a CMSEncryptedDataOutputConnector.
CMSEncryptedDataOutputConnector(java.io.OutputStream out, javax.crypto.SecretKey contentEncryptionKey, oracle.security.crypto.core.AlgorithmIdentifier contentEncryptionAlgID, oracle.security.crypto.asn1.ASN1ObjectID enclosedContentType)
          Creates a CMSEncryptedDataOutputConnector.
CMSEncryptedDataOutputConnector(java.io.OutputStream out, javax.crypto.SecretKey contentEncryptionKey, oracle.security.crypto.core.AlgorithmIdentifier contentEncryptionAlgID, oracle.security.crypto.asn1.ASN1ObjectID enclosedContentType, oracle.security.crypto.cert.AttributeSet unprotectedAttributes)
          Creates a CMSEncryptedDataOutputConnector.
CMSEncryptedDataOutputConnector(java.io.OutputStream out, javax.crypto.SecretKey contentEncryptionKey, oracle.security.crypto.core.AlgorithmIdentifier contentEncryptionAlgID, oracle.security.crypto.asn1.ASN1ObjectID enclosedContentType, oracle.security.crypto.cert.AttributeSet unprotectedAttributes, boolean writeEncryptedOutput)
          Creates a CMSEncryptedDataOutputConnector.

 

Method Summary
 oracle.security.crypto.asn1.ASN1ObjectID getExposedContentType()
          Returns the content type of the data that is output to the underlying output stream.
 java.io.OutputStream getOutputStream()
          Returns the output stream governed by this connector.

 

Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

 

Constructor Detail

CMSEncryptedDataOutputConnector

public CMSEncryptedDataOutputConnector(java.io.OutputStream out,
                                       javax.crypto.SecretKey contentEncryptionKey,
                                       oracle.security.crypto.core.AlgorithmIdentifier contentEncryptionAlgID,
                                       oracle.security.crypto.asn1.ASN1ObjectID enclosedContentType)
                                throws java.security.NoSuchAlgorithmException,
                                       java.security.InvalidKeyException
Creates a CMSEncryptedDataOutputConnector.

Note the changes in the Method signature

Previouslypublic CMSEncryptedDataOutputConnector (OutputStream , SymmetricKey ,AlgorithmIdentifier, ASN1ObjectID )

Nowpublic CMSEncryptedDataOutputConnector (OutputStream , SecretKey ,AlgorithmIdentifier, ASN1ObjectID )

Note the changes in exceptions Exceptions no longer thrown -- AlgorithmIdentifierException Exceptions included -- NoSuchAlgorithmException

Parameters:
out - The underlying output stream.
contentEncryptionKey - The content encryption key.
contentEncryptionAlgID - The encryption algorithm identifier.
enclosedContentType - The content type of the enclosed data.
Throws:
java.security.NoSuchAlgorithmException - The encryption algorithm is not supported.
java.security.InvalidKeyException - The content encryption key is not valid.

CMSEncryptedDataOutputConnector

public CMSEncryptedDataOutputConnector(java.io.OutputStream out,
                                       javax.crypto.SecretKey contentEncryptionKey,
                                       oracle.security.crypto.core.AlgorithmIdentifier contentEncryptionAlgID,
                                       oracle.security.crypto.asn1.ASN1ObjectID enclosedContentType,
                                       oracle.security.crypto.cert.AttributeSet unprotectedAttributes)
                                throws java.security.NoSuchAlgorithmException,
                                       java.security.InvalidKeyException
Creates a CMSEncryptedDataOutputConnector.

Note the changes in the Method signature

Previouslypublic CMSEncryptedDataOutputConnector (OutputStream , SymmetricKey , AlgorithmIdentifier, ASN1ObjectID , AttributeSet )

Nowpublic CMSEncryptedDataOutputConnector (OutputStream ,SecretKey , AlgorithmIdentifier, ASN1ObjectID , AttributeSet )

Note the changes in exceptions Exceptions no longer thrown -- AlgorithmIdentifierException Exceptions included -- NoSuchAlgorithmException

Parameters:
out - The 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.
Throws:
java.security.NoSuchAlgorithmException - The encryption algorithm is not supported.
java.security.InvalidKeyException - The encryption key is invalid.

CMSEncryptedDataOutputConnector

public CMSEncryptedDataOutputConnector(java.io.OutputStream out,
                                       javax.crypto.SecretKey contentEncryptionKey,
                                       oracle.security.crypto.core.AlgorithmIdentifier contentEncryptionAlgID,
                                       oracle.security.crypto.asn1.ASN1ObjectID enclosedContentType,
                                       oracle.security.crypto.cert.AttributeSet unprotectedAttributes,
                                       boolean writeEncryptedOutput)
                                throws java.security.NoSuchAlgorithmException,
                                       java.security.InvalidKeyException
Creates a CMSEncryptedDataOutputConnector.

Note the changes in the Method signature

Previouslypublic CMSEncryptedDataOutputConnector (OutputStream , SymmetricKey , AlgorithmIdentifier, ASN1ObjectID , AttributeSet,boolean )

Nowpublic CMSEncryptedDataOutputConnector (OutputStream ,SecretKey , AlgorithmIdentifier, ASN1ObjectID , AttributeSet,boolean )

Note the changes in exceptions Exceptions no longer thrown -- AlgorithmIdentifierException Exceptions included -- NoSuchAlgorithmException

Parameters:
out - The 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.
Throws:
java.security.NoSuchAlgorithmException - The encryption algorithm is not supported.
java.security.InvalidKeyException - The encryption key is invalid.

CMSEncryptedDataOutputConnector

public CMSEncryptedDataOutputConnector(CMSOutputConnector conn,
                                       javax.crypto.SecretKey contentEncryptionKey,
                                       oracle.security.crypto.core.AlgorithmIdentifier contentEncryptionAlgID,
                                       oracle.security.crypto.asn1.ASN1ObjectID enclosedContentType)
                                throws java.security.NoSuchAlgorithmException,
                                       java.security.InvalidKeyException
Creates a CMSEncryptedDataOutputConnector.

Note the changes in the Method signature

Previouslypublic CMSEncryptedDataOutputConnector (CMSOutputConnector , SymmetricKey , AlgorithmIdentifier, ASN1ObjectID )

Nowpublic CMSEncryptedDataOutputConnector (CMSOutputConnector ,SecretKey , AlgorithmIdentifier, ASN1ObjectID )

Note the changes in exceptions Exceptions no longer thrown -- AlgorithmIdentifierException Exceptions included -- NoSuchAlgorithmException

Parameters:
conn - The underlying output connector.
contentEncryptionKey - The content encryption key.
contentEncryptionAlgID - The encryption algorithm identifier.
enclosedContentType - The content type of the enclosed data.
Throws:
java.security.NoSuchAlgorithmException - The encryption algorithm is not supported.
java.security.InvalidKeyException - The content encryption key is not valid.

CMSEncryptedDataOutputConnector

public CMSEncryptedDataOutputConnector(CMSOutputConnector conn,
                                       javax.crypto.SecretKey contentEncryptionKey,
                                       oracle.security.crypto.core.AlgorithmIdentifier contentEncryptionAlgID,
                                       oracle.security.crypto.asn1.ASN1ObjectID enclosedContentType,
                                       oracle.security.crypto.cert.AttributeSet unprotectedAttributes)
                                throws java.security.NoSuchAlgorithmException,
                                       java.security.InvalidKeyException
Creates a CMSEncryptedDataOutputConnector.

Note the changes in the Method signature

Previouslypublic CMSEncryptedDataOutputConnector (CMSOutputConnector , SymmetricKey , AlgorithmIdentifier, ASN1ObjectID ,AttributeSet)

Nowpublic CMSEncryptedDataOutputConnector (CMSOutputConnector ,SecretKey , AlgorithmIdentifier, ASN1ObjectID,AttributeSet )

Note the changes in exceptions Exceptions no longer thrown -- AlgorithmIdentifierException Exceptions included -- NoSuchAlgorithmException

Parameters:
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.
Throws:
java.security.NoSuchAlgorithmException - The encryption algorithm is not supported.
java.security.InvalidKeyException - The encryption key is invalid.

CMSEncryptedDataOutputConnector

public CMSEncryptedDataOutputConnector(CMSOutputConnector conn,
                                       javax.crypto.SecretKey contentEncryptionKey,
                                       oracle.security.crypto.core.AlgorithmIdentifier contentEncryptionAlgID,
                                       oracle.security.crypto.asn1.ASN1ObjectID enclosedContentType,
                                       oracle.security.crypto.cert.AttributeSet unprotectedAttributes,
                                       boolean writeEncryptedOutput)
                                throws java.security.NoSuchAlgorithmException,
                                       java.security.InvalidKeyException
Creates a CMSEncryptedDataOutputConnector.

Note the changes in the Method signature

Previously public CMSEncryptedDataOutputConnector (CMSOutputConnector, SymmetricKey , AlgorithmIdentifier , ASN1ObjectID ,AttributeSet, boolean )

Now public CMSEncryptedDataOutputConnector (CMSOutputConnector, SecretKey , AlgorithmIdentifier , ASN1ObjectID ,AttributeSet, boolean )

Note the changes in exceptions Exceptions no longer thrown -- AlgorithmIdentifierException Exceptions included -- NoSuchAlgorithmException

Parameters:
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.
Throws:
java.security.NoSuchAlgorithmException - The encryption algorithm is not supported.
java.security.InvalidKeyException - The encryption key is invalid.

Method Detail

getExposedContentType

public oracle.security.crypto.asn1.ASN1ObjectID getExposedContentType()
Returns the content type of the data that is output to the underlying output stream.
Specified by:
getExposedContentType in interface CMSOutputConnector
Returns:
The content type identifier.

getOutputStream

public java.io.OutputStream getOutputStream()
Returns the output stream governed by this connector.
Specified by:
getOutputStream in interface CMSOutputConnector
Returns:
The underlying output stream.

Skip navigation links

Oracle Fusion Middleware CMS Java API Reference for Oracle Security Developer Tools
11g Release 1 (11.1.1)

E10667-04


Copyright © 2005, 2011 , Oracle. All rights reserved.