public class CMSEncryptedDataOutputConnector extends java.lang.Object implements CMSOutputConnector
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.
CMSOutputConnector,
CMSEncryptedDataOutputStream| Constructor and Description |
|---|
CMSEncryptedDataOutputConnector(CMSOutputConnector conn,
javax.crypto.SecretKey contentEncryptionKey,
AlgorithmIdentifier contentEncryptionAlgID,
ASN1ObjectID enclosedContentType)
Creates a
CMSEncryptedDataOutputConnector. |
CMSEncryptedDataOutputConnector(CMSOutputConnector conn,
javax.crypto.SecretKey contentEncryptionKey,
AlgorithmIdentifier contentEncryptionAlgID,
ASN1ObjectID enclosedContentType,
AttributeSet unprotectedAttributes)
Creates a
CMSEncryptedDataOutputConnector. |
CMSEncryptedDataOutputConnector(CMSOutputConnector conn,
javax.crypto.SecretKey contentEncryptionKey,
AlgorithmIdentifier contentEncryptionAlgID,
ASN1ObjectID enclosedContentType,
AttributeSet unprotectedAttributes,
boolean writeEncryptedOutput)
Creates a
CMSEncryptedDataOutputConnector. |
CMSEncryptedDataOutputConnector(java.io.OutputStream out,
javax.crypto.SecretKey contentEncryptionKey,
AlgorithmIdentifier contentEncryptionAlgID,
ASN1ObjectID enclosedContentType)
Creates a
CMSEncryptedDataOutputConnector. |
CMSEncryptedDataOutputConnector(java.io.OutputStream out,
javax.crypto.SecretKey contentEncryptionKey,
AlgorithmIdentifier contentEncryptionAlgID,
ASN1ObjectID enclosedContentType,
AttributeSet unprotectedAttributes)
Creates a
CMSEncryptedDataOutputConnector. |
CMSEncryptedDataOutputConnector(java.io.OutputStream out,
javax.crypto.SecretKey contentEncryptionKey,
AlgorithmIdentifier contentEncryptionAlgID,
ASN1ObjectID enclosedContentType,
AttributeSet unprotectedAttributes,
boolean writeEncryptedOutput)
Creates a
CMSEncryptedDataOutputConnector. |
| Modifier and Type | Method and Description |
|---|---|
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.
|
public CMSEncryptedDataOutputConnector(java.io.OutputStream out,
javax.crypto.SecretKey contentEncryptionKey,
AlgorithmIdentifier contentEncryptionAlgID,
ASN1ObjectID enclosedContentType)
throws java.security.NoSuchAlgorithmException,
java.security.InvalidKeyException
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
out - The underlying output stream.contentEncryptionKey - The content encryption key.contentEncryptionAlgID - The encryption algorithm identifier.enclosedContentType - The content type of the enclosed data.java.security.NoSuchAlgorithmException - The encryption algorithm is not supported.java.security.InvalidKeyException - The content encryption key is not valid.public CMSEncryptedDataOutputConnector(java.io.OutputStream out,
javax.crypto.SecretKey contentEncryptionKey,
AlgorithmIdentifier contentEncryptionAlgID,
ASN1ObjectID enclosedContentType,
AttributeSet unprotectedAttributes)
throws java.security.NoSuchAlgorithmException,
java.security.InvalidKeyException
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
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.java.security.NoSuchAlgorithmException - The encryption algorithm is not supported.java.security.InvalidKeyException - The encryption key is invalid.public CMSEncryptedDataOutputConnector(java.io.OutputStream out,
javax.crypto.SecretKey contentEncryptionKey,
AlgorithmIdentifier contentEncryptionAlgID,
ASN1ObjectID enclosedContentType,
AttributeSet unprotectedAttributes,
boolean writeEncryptedOutput)
throws java.security.NoSuchAlgorithmException,
java.security.InvalidKeyException
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
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.java.security.NoSuchAlgorithmException - The encryption algorithm is not supported.java.security.InvalidKeyException - The encryption key is invalid.public CMSEncryptedDataOutputConnector(CMSOutputConnector conn, javax.crypto.SecretKey contentEncryptionKey, AlgorithmIdentifier contentEncryptionAlgID, ASN1ObjectID enclosedContentType) throws java.security.NoSuchAlgorithmException, java.security.InvalidKeyException
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
conn - The underlying output connector.contentEncryptionKey - The content encryption key.contentEncryptionAlgID - The encryption algorithm identifier.enclosedContentType - The content type of the enclosed data.java.security.NoSuchAlgorithmException - The encryption algorithm is not supported.java.security.InvalidKeyException - The content encryption key is not valid.public CMSEncryptedDataOutputConnector(CMSOutputConnector conn, javax.crypto.SecretKey contentEncryptionKey, AlgorithmIdentifier contentEncryptionAlgID, ASN1ObjectID enclosedContentType, AttributeSet unprotectedAttributes) throws java.security.NoSuchAlgorithmException, java.security.InvalidKeyException
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
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.java.security.NoSuchAlgorithmException - The encryption algorithm is not supported.java.security.InvalidKeyException - The encryption key is invalid.public CMSEncryptedDataOutputConnector(CMSOutputConnector conn, javax.crypto.SecretKey contentEncryptionKey, AlgorithmIdentifier contentEncryptionAlgID, ASN1ObjectID enclosedContentType, AttributeSet unprotectedAttributes, boolean writeEncryptedOutput) throws java.security.NoSuchAlgorithmException, java.security.InvalidKeyException
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
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.java.security.NoSuchAlgorithmException - The encryption algorithm is not supported.java.security.InvalidKeyException - The encryption key is invalid.public ASN1ObjectID getExposedContentType()
getExposedContentType in interface CMSOutputConnectorpublic java.io.OutputStream getOutputStream()
getOutputStream in interface CMSOutputConnector