|
Oracle Security Developer Tools CMS Java API Reference 10g (10.1.4.0.1) B28170-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.CMSAuthenticatedDataOutputStream
A CMSAuthenticatedDataOutputStream writes its output in the form of a CMS authenticated-data structure, generating the message authentication code in the process.
Specifically, the effect of using this class is as if the following process took place:
authenticated-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.
Please be aware that the HMAC key is stored in a RecipientInfo structure. If you decide to use the Key Encryption (CMSKEKRecipientInfo) key management mechanism, the HMAC key used must be a TripleDES or RC2 key.
IMPORTANT: This class generates large CMS authenticated-data Objects more efficiently (Java VM memory usage) than the CMSAuthenticatedDataContentInfo class.
CMSOutputStream, CMSAuthenticatedDataContentInfo, CMSAuthenticatedDataOutputConnector| Field Summary |
| Fields inherited from class java.io.FilterOutputStream |
out |
| Constructor Summary | |
CMSAuthenticatedDataOutputStream(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, oracle.security.crypto.core.SymmetricKey hmacKey, oracle.security.crypto.core.AlgorithmIdentifier hmacKeyAlgID, boolean detachEncapContent)Creates a CMSAuthenticatedDataOutputStream. |
|
CMSAuthenticatedDataOutputStream(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, oracle.security.crypto.core.SymmetricKey hmacKey, boolean detachEncapContent)Creates a CMSAuthenticatedDataOutputStream. |
|
CMSAuthenticatedDataOutputStream(CMSOutputConnector conn, java.util.Vector recipients, oracle.security.crypto.core.AlgorithmIdentifier macAlgorithm, oracle.security.crypto.asn1.ASN1ObjectID encapContentType, oracle.security.crypto.core.SymmetricKey hmacKey, boolean detachEncapContent)Creates a CMSAuthenticatedDataOutputStream. |
|
CMSAuthenticatedDataOutputStream(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, oracle.security.crypto.core.SymmetricKey hmacKey, oracle.security.crypto.core.AlgorithmIdentifier hmacKeyAlgID, boolean detachEncapContent)Creates a CMSAuthenticatedDataOutputStream. |
|
CMSAuthenticatedDataOutputStream(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, oracle.security.crypto.core.SymmetricKey hmacKey, boolean detachEncapContent)Creates a CMSAuthenticatedDataOutputStream. |
|
CMSAuthenticatedDataOutputStream(java.io.OutputStream out, java.util.Vector recipients, oracle.security.crypto.core.AlgorithmIdentifier macAlgorithm, oracle.security.crypto.asn1.ASN1ObjectID encapContentType, oracle.security.crypto.core.SymmetricKey hmacKey, oracle.security.crypto.core.AlgorithmIdentifier hmacKeyAlgID, boolean detachEncapContent)Creates a CMSAuthenticatedDataOutputStream. |
|
CMSAuthenticatedDataOutputStream(java.io.OutputStream out, java.util.Vector recipients, oracle.security.crypto.core.AlgorithmIdentifier macAlgorithm, oracle.security.crypto.asn1.ASN1ObjectID encapContentType, oracle.security.crypto.core.SymmetricKey hmacKey, boolean detachEncapContent)Creates a CMSAuthenticatedDataOutputStream. |
|
| Method Summary | |
void |
close() |
oracle.security.crypto.asn1.ASN1ObjectID |
getExposedContentType()Returns the content type of the data that is output to the underlying output stream. |
void |
terminate()Finish writing the authenticated-data structure. |
void |
write(byte[] b, int off, 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 CMSAuthenticatedDataOutputStream(java.io.OutputStream out,
java.util.Vector recipients,
oracle.security.crypto.core.AlgorithmIdentifier macAlgorithm,
oracle.security.crypto.asn1.ASN1ObjectID encapContentType,
oracle.security.crypto.core.SymmetricKey hmacKey,
boolean detachEncapContent)
throws oracle.security.crypto.util.InvalidInputException,
oracle.security.crypto.core.AlgorithmIdentifierException
CMSAuthenticatedDataOutputStream.out - The underlying 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.oracle.security.crypto.core.AlgorithmIdentifierException - Algorithm is not supported.oracle.security.crypto.util.InvalidInputException - Input appears to be invalid.
public CMSAuthenticatedDataOutputStream(java.io.OutputStream out,
java.util.Vector recipients,
oracle.security.crypto.core.AlgorithmIdentifier macAlgorithm,
oracle.security.crypto.asn1.ASN1ObjectID encapContentType,
oracle.security.crypto.core.SymmetricKey hmacKey,
oracle.security.crypto.core.AlgorithmIdentifier hmacKeyAlgID,
boolean detachEncapContent)
throws oracle.security.crypto.util.InvalidInputException,
oracle.security.crypto.core.AlgorithmIdentifierException
CMSAuthenticatedDataOutputStream.out - The underlying 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.oracle.security.crypto.core.AlgorithmIdentifierException - Algorithm is not supported.oracle.security.crypto.util.InvalidInputException - Input appears to be invalid.
public CMSAuthenticatedDataOutputStream(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,
oracle.security.crypto.core.SymmetricKey hmacKey,
boolean detachEncapContent)
throws oracle.security.crypto.util.InvalidInputException,
oracle.security.crypto.core.AlgorithmIdentifierException
CMSAuthenticatedDataOutputStream.out - The underlying output stream.origInfo - The Originator Info.recipients - The recipients (each element must be an instance of CMSRecipientInfoSpec).macAlgorithm - The HMAC Algorithm.digestAlgID - The digest 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.oracle.security.crypto.core.AlgorithmIdentifierException - Algorithm is not supported.oracle.security.crypto.util.InvalidInputException - Input appears to be invalid.
public CMSAuthenticatedDataOutputStream(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,
oracle.security.crypto.core.SymmetricKey hmacKey,
oracle.security.crypto.core.AlgorithmIdentifier hmacKeyAlgID,
boolean detachEncapContent)
throws oracle.security.crypto.util.InvalidInputException,
oracle.security.crypto.core.AlgorithmIdentifierException
CMSAuthenticatedDataOutputStream.out - The underlying output stream.origInfo - The Originator Info.recipients - The recipients (each element must be an instance of CMSRecipientInfoSpec).macAlgorithm - The HMAC Algorithm.digestAlgID - The digest 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.hmacKeyAlgID - The HMAC key algorithm.detachEncapContent - If true the authenticated content is not written to the underlying output stream; false otherwise.oracle.security.crypto.core.AlgorithmIdentifierException - Algorithm is not supported.oracle.security.crypto.util.InvalidInputException - Input appears to be invalid.
public CMSAuthenticatedDataOutputStream(CMSOutputConnector conn,
java.util.Vector recipients,
oracle.security.crypto.core.AlgorithmIdentifier macAlgorithm,
oracle.security.crypto.asn1.ASN1ObjectID encapContentType,
oracle.security.crypto.core.SymmetricKey hmacKey,
boolean detachEncapContent)
throws oracle.security.crypto.util.InvalidInputException,
oracle.security.crypto.core.AlgorithmIdentifierException
CMSAuthenticatedDataOutputStream.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.oracle.security.crypto.core.AlgorithmIdentifierException - Algorithm is not supported.oracle.security.crypto.util.InvalidInputException - Input appears to be invalid.
public CMSAuthenticatedDataOutputStream(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,
oracle.security.crypto.core.SymmetricKey hmacKey,
boolean detachEncapContent)
throws oracle.security.crypto.util.InvalidInputException,
oracle.security.crypto.core.AlgorithmIdentifierException
CMSAuthenticatedDataOutputStream.conn - The underlying output connector.origInfo - The Originator Info.recipients - The recipients (each element must be an instance of CMSRecipientInfoSpec).macAlgorithm - The HMAC Algorithm.digestAlgID - The digest 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.oracle.security.crypto.core.AlgorithmIdentifierException - Algorithm is not supported.oracle.security.crypto.util.InvalidInputException - Input appears to be invalid.
public CMSAuthenticatedDataOutputStream(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,
oracle.security.crypto.core.SymmetricKey hmacKey,
oracle.security.crypto.core.AlgorithmIdentifier hmacKeyAlgID,
boolean detachEncapContent)
throws oracle.security.crypto.util.InvalidInputException,
oracle.security.crypto.core.AlgorithmIdentifierException
CMSAuthenticatedDataOutputStream.conn - The underlying output connector.origInfo - The Originator Info.recipients - The recipients (each element must be an instance of CMSRecipientInfoSpec).macAlgorithm - The HMAC Algorithm.digestAlgID - The digest 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.hmacKeyAlgID - The HMAC key algorithm.detachEncapContent - If true the authenticated content is not written to the underlying output stream; false otherwise.oracle.security.crypto.core.AlgorithmIdentifierException - Algorithm is not supported.oracle.security.crypto.util.InvalidInputException - Input appears to be invalid.| Method Detail |
public void terminate()
throws java.io.IOException
authenticated-data structure.
This method must be called only after all the authenticated data has been written.
terminate in class CMSOutputStreamjava.io.IOException - An I/O error ocuurs.
public void write(int ch)
throws java.io.IOException
java.io.IOException
public void write(byte[] b,
int off,
int len)
throws java.io.IOException
java.io.IOException
public void close()
throws java.io.IOException
java.io.IOExceptionpublic oracle.security.crypto.asn1.ASN1ObjectID getExposedContentType()
getExposedContentType in class CMSOutputStream
|
Oracle Security Developer Tools CMS Java API Reference 10g (10.1.4.0.1) B28170-01 |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||