public class CMSEnvelopedDataOutputConnector extends java.lang.Object implements CMSOutputConnector
CMSEnvelopedDataOutputConnector is used in place of a CMSEnvelopedDataOutputStream when constructing nested CMS objects containing enveloped-data structures.
A CMSEnvelopedDataOutputConnector is essentially an output stream filter that wraps the data written to it within a CMS enveloped-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.
CMSOutputConnector, CMSEnvelopedDataOutputStream| Constructor and Description |
|---|
CMSEnvelopedDataOutputConnector(CMSOutputConnector conn, ASN1ObjectID enclosedContentType, AlgorithmIdentifier contentEncryptionAlgID, java.util.Vector recipients, boolean writeContent)
Creates a
CMSEnvelopedDataOutputConnector. |
CMSEnvelopedDataOutputConnector(CMSOutputConnector conn, ASN1ObjectID enclosedContentType, AlgorithmIdentifier contentEncryptionAlgID, java.util.Vector recipients, boolean writeContent, OriginatorInfo origInfo, AttributeSet unprotectedAttribs)
Creates a
CMSEnvelopedDataOutputConnector. |
CMSEnvelopedDataOutputConnector(java.io.OutputStream out, ASN1ObjectID enclosedContentType, AlgorithmIdentifier contentEncryptionAlgID, java.util.Vector recipients)
Creates a
CMSEnvelopedDataOutputConnector. |
CMSEnvelopedDataOutputConnector(java.io.OutputStream out, ASN1ObjectID enclosedContentType, AlgorithmIdentifier contentEncryptionAlgID, java.util.Vector recipients, boolean writeContent, OriginatorInfo origInfo, AttributeSet unprotectedAttribs)
Creates a
CMSEnvelopedDataOutputConnector. |
| Modifier and Type | Method and Description |
|---|---|
ASN1ObjectID |
getExposedContentType()
Retruns the content type of the data that is output to the underlying output stream.
|
java.io.OutputStream |
getOutputStream()
Returns the underlying output stream.
|
public CMSEnvelopedDataOutputConnector(java.io.OutputStream out,
ASN1ObjectID enclosedContentType,
AlgorithmIdentifier contentEncryptionAlgID,
java.util.Vector recipients)
throws java.security.NoSuchAlgorithmException
CMSEnvelopedDataOutputConnector.
Note the changes in exceptions Exceptions not thrown -- AlgorithmIdentifierException Exceptions introduced -- NoSuchAlgorithmException
out - The underlying output stream.enclosedContentType - The enclosed content type.contentEncryptionAlgID - The content encryption algorithm.recipients - A list of recipients.java.security.NoSuchAlgorithmException - Unrecognized encryption algorithm.
public CMSEnvelopedDataOutputConnector(java.io.OutputStream out,
ASN1ObjectID enclosedContentType,
AlgorithmIdentifier contentEncryptionAlgID,
java.util.Vector recipients,
boolean writeContent,
OriginatorInfo origInfo,
AttributeSet unprotectedAttribs)
throws java.security.NoSuchAlgorithmException
CMSEnvelopedDataOutputConnector.
Note the changes in exceptions Exceptions not thrown -- AlgorithmIdentifierException Exceptions introduced -- NoSuchAlgorithmException
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.java.security.NoSuchAlgorithmException - Unrecognized encryption algorithm.public CMSEnvelopedDataOutputConnector(CMSOutputConnector conn, ASN1ObjectID enclosedContentType, AlgorithmIdentifier contentEncryptionAlgID, java.util.Vector recipients, boolean writeContent) throws java.security.NoSuchAlgorithmException
CMSEnvelopedDataOutputConnector.
Note the changes in exceptions Exceptions not thrown -- AlgorithmIdentifierException Exceptions introduced -- NoSuchAlgorithmException
conn - The underlying output connector.enclosedContentType - The enclosed content type.contentEncryptionAlgID - The content encryption algorithm.recipients - A list of recipients.writeContent - true if the encrypted content is to be written to the underlying output stream; false otherwise.java.security.NoSuchAlgorithmException - Unrecognized encryption algorithm.public CMSEnvelopedDataOutputConnector(CMSOutputConnector conn, ASN1ObjectID enclosedContentType, AlgorithmIdentifier contentEncryptionAlgID, java.util.Vector recipients, boolean writeContent, OriginatorInfo origInfo, AttributeSet unprotectedAttribs) throws java.security.NoSuchAlgorithmException
CMSEnvelopedDataOutputConnector.
Note the changes in exceptions Exceptions not thrown -- AlgorithmIdentifierException Exceptions introduced -- NoSuchAlgorithmException
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 unprotected attributes.java.security.NoSuchAlgorithmException - Unrecognized encryption algorithm.public ASN1ObjectID getExposedContentType()
getExposedContentType in interface CMSOutputConnectorpublic java.io.OutputStream getOutputStream()
getOutputStream in interface CMSOutputConnector