Skip navigation links

Oracle Security Developer Tools CMS Java API Reference
11g (11.1.1)

E10667-02


oracle.security.crypto.cms
Class CMSAuthenticatedDataOutputConnector

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

All Implemented Interfaces:
CMSOutputConnector

public class CMSAuthenticatedDataOutputConnector
extends java.lang.Object
implements CMSOutputConnector

A CMSAuthenticatedDataOutputConnector is used in place of a CMSAuthenticatedDataOutputStream when constructing nested CMS objects containing authenticated-data structures.

A CMSAuthenticatedDataOutputConnector is essentially an output stream filter that wraps the data written to it within a CMS authenticated-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, CMSOutputStream, CMSAuthenticatedDataOutputStream

Constructor Summary
CMSAuthenticatedDataOutputConnector(CMSOutputConnector conn, OriginatorInfo origInfo, java.util.Vector recipients, oracle.security.crypto.core.AlgorithmIdentifier macAlgorithm, oracle.security.crypto.core.AlgorithmIdentifier digestAlgID, oracle.security.crypto.asn1.ASN1ObjectID encapContentType, oracle.security.crypto.cert.AttributeSet authenticatedAttribs, oracle.security.crypto.cert.AttributeSet unauthenticatedAttribs, javax.crypto.SecretKey hmacKey, boolean detachEncapContent)
          Creates a CMSAuthenticatedDataOutputConnector.
CMSAuthenticatedDataOutputConnector(CMSOutputConnector conn, java.util.Vector recipients, oracle.security.crypto.core.AlgorithmIdentifier macAlgorithm, oracle.security.crypto.asn1.ASN1ObjectID encapContentType, javax.crypto.SecretKey hmacKey, boolean detachEncapContent)
          Creates a CMSAuthenticatedDataOutputConnector.
CMSAuthenticatedDataOutputConnector(java.io.OutputStream out, OriginatorInfo origInfo, java.util.Vector recipients, oracle.security.crypto.core.AlgorithmIdentifier macAlgorithm, oracle.security.crypto.core.AlgorithmIdentifier digestAlgID, oracle.security.crypto.asn1.ASN1ObjectID encapContentType, oracle.security.crypto.cert.AttributeSet authenticatedAttribs, oracle.security.crypto.cert.AttributeSet unauthenticatedAttribs, javax.crypto.SecretKey hmacKey, boolean detachEncapContent)
          Creates a CMSAuthenticatedDataOutputConnector.
CMSAuthenticatedDataOutputConnector(java.io.OutputStream out, java.util.Vector recipients, oracle.security.crypto.core.AlgorithmIdentifier macAlgorithm, oracle.security.crypto.asn1.ASN1ObjectID encapContentType, javax.crypto.SecretKey hmacKey, boolean detachEncapContent)
          Creates a CMSAuthenticatedDataOutputConnector.

 

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

CMSAuthenticatedDataOutputConnector

public CMSAuthenticatedDataOutputConnector(java.io.OutputStream out,
                                           java.util.Vector recipients,
                                           oracle.security.crypto.core.AlgorithmIdentifier macAlgorithm,
                                           oracle.security.crypto.asn1.ASN1ObjectID encapContentType,
                                           javax.crypto.SecretKey hmacKey,
                                           boolean detachEncapContent)
                                    throws java.security.NoSuchAlgorithmException,
                                           oracle.security.crypto.util.InvalidInputException
Creates a CMSAuthenticatedDataOutputConnector.

Note the changes in the Method signature

Previouslypublic CMSAuthenticatedDataOutputConnector(OutputStream, Vector , AlgorithmIdentifier , ASN1ObjectID , SymmetricKey ,boolean )

Nowpublic CMSAuthenticatedDataOutputConnector(OutputStream, Vector , AlgorithmIdentifier , ASN1ObjectID , SecretKey ,boolean )

Note the changes in the exceptions thrown

Exceptions not thrown - AlgorithmIdentifierException

Exceptions included - NoSuchAlgorithmException

Parameters:
out - The output stream.
recipients - The recipients (each element must be an instance of CMSRecipientInfoSpec).
macAlgorithm - The HMAC Algorithm.
encapContentType - The content type of data being authenticated.
hmacKey - The HMAC key.
detachEncapContent - If true the authenticated content is not written to the underlying output stream; false otherwise.
Throws:
java.security.NoSuchAlgorithmException - Algorithm is not supported.
oracle.security.crypto.util.InvalidInputException - Input appears to be invalid.

CMSAuthenticatedDataOutputConnector

public CMSAuthenticatedDataOutputConnector(java.io.OutputStream out,
                                           OriginatorInfo origInfo,
                                           java.util.Vector recipients,
                                           oracle.security.crypto.core.AlgorithmIdentifier macAlgorithm,
                                           oracle.security.crypto.core.AlgorithmIdentifier digestAlgID,
                                           oracle.security.crypto.asn1.ASN1ObjectID encapContentType,
                                           oracle.security.crypto.cert.AttributeSet authenticatedAttribs,
                                           oracle.security.crypto.cert.AttributeSet unauthenticatedAttribs,
                                           javax.crypto.SecretKey hmacKey,
                                           boolean detachEncapContent)
                                    throws java.security.NoSuchAlgorithmException,
                                           oracle.security.crypto.util.InvalidInputException
Creates a CMSAuthenticatedDataOutputConnector.

Note the changes in the Method signature

Previouslypublic CMSAuthenticatedDataOutputConnector(OutputStream , OriginatorInfo , Vector , AlgorithmIdentifier, AlgorithmIdentifier , ASN1ObjectID , AttributeSet AttributeSet , SymmetricKey , boolean )

Nowpublic CMSAuthenticatedDataOutputConnector(OutputStream , OriginatorInfo , Vector , AlgorithmIdentifier, AlgorithmIdentifier , ASN1ObjectID , AttributeSet AttributeSet , SecretKey , boolean )

Note the changes in the exceptions thrown

Exceptions not thrown - AlgorithmIdentifierException

Exceptions included - NoSuchAlgorithmException

Parameters:
out - The output stream.
origInfo - The Originator Info.
recipients - The recipients (each element must be an instance of CMSRecipientInfoSpec).
macAlgorithm - The HMAC Algorithm.
encapContentType - The content type of data being authenticated.
authenticatedAttribs - The set of Authenticated Attributes.
unauthenticatedAttribs - The set of Unauthenticated Attributes.
hmacKey - The HMAC key.
detachEncapContent - If true the authenticated content is not written to the underlying output stream; false otherwise.
Throws:
java.security.NoSuchAlgorithmException - Algorithm is not supported.
oracle.security.crypto.util.InvalidInputException - Input appears to be invalid.

CMSAuthenticatedDataOutputConnector

public CMSAuthenticatedDataOutputConnector(CMSOutputConnector conn,
                                           java.util.Vector recipients,
                                           oracle.security.crypto.core.AlgorithmIdentifier macAlgorithm,
                                           oracle.security.crypto.asn1.ASN1ObjectID encapContentType,
                                           javax.crypto.SecretKey hmacKey,
                                           boolean detachEncapContent)
                                    throws java.security.NoSuchAlgorithmException,
                                           oracle.security.crypto.util.InvalidInputException
Creates a CMSAuthenticatedDataOutputConnector.

Note the changes in the Method signature

Previouslypublic CMSAuthenticatedDataOutputConnector(CMSOutputConnector , Vector , AlgorithmIdentifier , ASN1ObjectID , SymmetricKey ,boolean )

Nowpublic CMSAuthenticatedDataOutputConnector(CMSOutputConnector , Vector , AlgorithmIdentifier , ASN1ObjectID , SecretKey ,boolean )

Note the changes in the exceptions thrown

Exceptions not thrown - AlgorithmIdentifierException

Exceptions included - NoSuchAlgorithmException

Parameters:
conn - The output stream.
recipients - The recipients (each element must be an instance of CMSRecipientInfoSpec).
macAlgorithm - The HMAC Algorithm.
encapContentType - The content type of data being authenticated.
hmacKey - The HMAC key.
detachEncapContent - If true the authenticated content is not written to the underlying output stream; false otherwise.
Throws:
java.security.NoSuchAlgorithmException - Algorithm is not supported.
oracle.security.crypto.util.InvalidInputException - Input appears to be invalid.

CMSAuthenticatedDataOutputConnector

public CMSAuthenticatedDataOutputConnector(CMSOutputConnector conn,
                                           OriginatorInfo origInfo,
                                           java.util.Vector recipients,
                                           oracle.security.crypto.core.AlgorithmIdentifier macAlgorithm,
                                           oracle.security.crypto.core.AlgorithmIdentifier digestAlgID,
                                           oracle.security.crypto.asn1.ASN1ObjectID encapContentType,
                                           oracle.security.crypto.cert.AttributeSet authenticatedAttribs,
                                           oracle.security.crypto.cert.AttributeSet unauthenticatedAttribs,
                                           javax.crypto.SecretKey hmacKey,
                                           boolean detachEncapContent)
                                    throws java.security.NoSuchAlgorithmException,
                                           oracle.security.crypto.util.InvalidInputException
Creates a CMSAuthenticatedDataOutputConnector.

Note the changes in the Method signature

Previouslypublic CMSAuthenticatedDataOutputConnector(CMSOutputConnector , OriginatorInfoorigInfo, Vector ,AlgorithmIdentifier, AlgorithmIdentifier ,ASN1ObjectID , AttributeSet , AttributeSet , SymmetricKey , boolean )

Nowpublic CMSAuthenticatedDataOutputConnector(CMSOutputConnector , OriginatorInfoorigInfo, Vector ,AlgorithmIdentifier, AlgorithmIdentifier ,ASN1ObjectID , AttributeSet , AttributeSet , SecretKey , boolean )

Note the changes in the exceptions thrown

Exceptions not thrown - AlgorithmIdentifierException

Exceptions included - NoSuchAlgorithmException

Parameters:
conn - The output connector.
origInfo - The Originator Info.
recipients - The recipients (each element must be an instance of CMSRecipientInfoSpec).
macAlgorithm - The HMAC Algorithm.
encapContentType - The content type of data being authenticated.
authenticatedAttribs - The set of Authenticated Attributes.
unauthenticatedAttribs - The set of Unauthenticated Attributes.
hmacKey - The HMAC key.
detachEncapContent - If true the authenticated content is not written to the underlying output stream; false otherwise.
Throws:
java.security.NoSuchAlgorithmException - Algorithm is not supported.
oracle.security.crypto.util.InvalidInputException - Input appears to be 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 Security Developer Tools CMS Java API Reference
11g (11.1.1)

E10667-02


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