public class CMSEncryptedDataInputStream extends CMSInputStream
CMSEncryptedDataInputStream is used to read encrypted-data CMS objects.
A CMSEncryptedDataInputStream is essentially a input stream filter that unwraps the CMS encrypted-data structure from the data read in.
IMPORTANT: This class processes large CMS encrypted-data Objects more efficiently (Java VM memory usage) than the CMSEncryptedDataContentInfo class.
| Constructor and Description |
|---|
CMSEncryptedDataInputStream(CMSInputConnector conn, javax.crypto.SecretKey contentEncryptionKey)
Creates a
CMSEncryptedDataInputStream. |
CMSEncryptedDataInputStream(java.io.InputStream in, javax.crypto.SecretKey contentEncryptionKey)
Creates a
CMSEncryptedDataInputStream. |
| Modifier and Type | Method and Description |
|---|---|
int |
available() |
oracle.security.crypto.core.AlgorithmIdentifier |
getContentEncryptionAlgID()
Returns the content encryption algorithm.
|
oracle.security.crypto.asn1.ASN1ObjectID |
getEnclosedContentType()
Returns the content type of the encrypted content.
|
AttributeSet |
getUnprotectedAttributes()
Returns the Unprotected Attributes.
|
oracle.security.crypto.asn1.ASN1Integer |
getVersion()
Deprecated.
As of Phaos CMS 2.0.1, replaced by
getVersionNumber() |
java.math.BigInteger |
getVersionNumber()
Returns the version number of this CMS Object.
|
void |
mark(int readlimit)
Not supported.
|
boolean |
markSupported()
Always returns
false</false>. |
int |
read() |
int |
read(byte[] buffer, int offset, int len) |
void |
reset()
Not supported.
|
long |
skip(long n) |
void |
terminate()
Finish reading the
encrypted-data structure. |
public CMSEncryptedDataInputStream(java.io.InputStream in,
javax.crypto.SecretKey contentEncryptionKey)
CMSEncryptedDataInputStream.
Note the changes in the Method signature
Previouslypublic CMSEncryptedDataInputStream (InputStream , SymmetricKey )
Nowpublic CMSEncryptedDataInputStream (InputStream , SecretKey )
in - The underlying input stream.contentEncryptionKey - The content encryption key.public CMSEncryptedDataInputStream(CMSInputConnector conn, javax.crypto.SecretKey contentEncryptionKey)
CMSEncryptedDataInputStream.
Note the changes in the Method signature
Previouslypublic CMSEncryptedDataInputStream (CMSInputConnector, SymmetricKey )
Nowpublic CMSEncryptedDataInputStream (CMSInputConnector , SecretKey )
conn - The underlying input connector.contentEncryptionKey - The content encryption key.public int read()
throws java.io.IOException
read in class java.io.FilterInputStreamjava.io.IOExceptionpublic int read(byte[] buffer,
int offset,
int len)
throws java.io.IOException
read in class java.io.FilterInputStreamjava.io.IOExceptionpublic int available()
throws java.io.IOException
available in class java.io.FilterInputStreamjava.io.IOExceptionpublic long skip(long n)
throws java.io.IOException
skip in class java.io.FilterInputStreamjava.io.IOExceptionpublic boolean markSupported()
false</false>.Overrides:markSupported in class java.io.FilterInputStreampublic void mark(int readlimit)
mark in class java.io.FilterInputStreampublic void reset()
throws java.io.IOException
reset in class java.io.FilterInputStreamjava.io.IOException - always(not supported).public void terminate()
throws java.io.IOException
encrypted-data structure.
This method should be invoked only after all the enclosed content has been read from the input stream.
terminate in class CMSInputStreamjava.io.IOException - If any enclosed content is still present in the input stream or an I/O error occurred.public java.math.BigInteger getVersionNumber()
throws java.io.IOException
java.io.IOException - An I/O error occurred or the input is incorrectly encoded.public oracle.security.crypto.asn1.ASN1Integer getVersion()
throws java.io.IOException
getVersionNumber()java.io.IOException - If the input encoding is incorrect or an I/O error occurred.public oracle.security.crypto.asn1.ASN1ObjectID getEnclosedContentType()
throws java.io.IOException
getEnclosedContentType in class CMSInputStreamjava.io.IOException - If the input encoding is incorrect or an I/O error occurred.public oracle.security.crypto.core.AlgorithmIdentifier getContentEncryptionAlgID()
throws java.io.IOException
java.io.IOException - If the input encoding is incorrect or an I/O error occurred.public AttributeSet getUnprotectedAttributes() throws java.io.IOException
null otherwise.java.io.IOException - If the input encoding is incorrect or an I/O error occurred.