|
Oracle Security Developer Tools CMS Java API Reference 10g Release 2 (10.1.2.0.2) B15564-01 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object
java.io.InputStream
java.io.FilterInputStream
oracle.security.crypto.cms.CMSInputStream
oracle.security.crypto.cms.CMSAuthenticatedDataInputStream
A CMSAuthenticatedDataInputStream
is used to read authenticated-data
CMS objects.
A CMSAuthenticatedDataInputStream
is essentially a input stream filter that unwraps the CMS authenticated-data
structure from the data read in.
You will be able to read a detached authenticated-data object using the CMSAuthenticatedDataInputStream
class but you will not be able to verify the MAC.
IMPORTANT: This class processes large CMS authenticated-data Objects more efficiently (Java VM memory usage) than the CMSAuthenticatedDataContentInfo
class.
CMSInputConnector
, CMSAuthenticatedDataInputConnector
, CMSAuthenticatedDataContentInfo
Field Summary |
Fields inherited from class java.io.FilterInputStream |
in |
Constructor Summary | |
CMSAuthenticatedDataInputStream(CMSInputConnector conn, PrivateKey recipientPrivateKey, oracle.security.crypto.cert.X509 recipientCert) Creates a CMSAuthenticatedDataInputStream . |
|
CMSAuthenticatedDataInputStream(CMSInputConnector conn, SymmetricKey keyEncryptionKey) Creates a CMSAuthenticatedDataInputStream . |
|
CMSAuthenticatedDataInputStream(java.io.InputStream in, PrivateKey recipientPrivateKey, oracle.security.crypto.cert.X509 recipientCert) Creates a CMSAuthenticatedDataInputStream . |
|
CMSAuthenticatedDataInputStream(java.io.InputStream in, SymmetricKey keyEncryptionKey) Creates a CMSAuthenticatedDataInputStream . |
Method Summary | |
int |
available() |
oracle.security.crypto.cert.AttributeSet |
getAuthenticatedAttributes() Returns the set of Authenticated Attributes. |
AlgorithmIdentifier |
getDigestAlgID() Returns the Digest Algorithm. |
ASN1ObjectID |
getEnclosedContentType() Returns the content type of the authenticated data. |
byte[] |
getMAC() Returns the MAC. |
AlgorithmIdentifier |
getMACAlgID() Returns the MAC Algorithm. |
OriginatorInfo |
getOriginatorInfo() Returns the Originator Info. |
oracle.security.crypto.cert.AttributeSet |
getUnauthenticatedAttributes() Returns the set of Unauthenticated Attributes. |
ASN1Integer |
getVersion() Deprecated. As of Phaos CMS 2.0.1, replaced by getVersionNumber() |
java.math.BigInteger |
getVersionNumber() Returns the version number. |
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) Not supported. |
void |
terminate() Finish reading the authenticated-data structure. |
void |
verifyMAC() Verify the Message Authentication Code. |
Methods inherited from class java.io.FilterInputStream |
close, read |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public CMSAuthenticatedDataInputStream(java.io.InputStream in, PrivateKey recipientPrivateKey, oracle.security.crypto.cert.X509 recipientCert)
CMSAuthenticatedDataInputStream
.in
- The underlying input stream.recipientPrivateKey
- The recipient's private key.recipientCert
- The recipient's certificate.public CMSAuthenticatedDataInputStream(CMSInputConnector conn, PrivateKey recipientPrivateKey, oracle.security.crypto.cert.X509 recipientCert)
CMSAuthenticatedDataInputStream
.conn
- The underlying input connector.recipientPrivateKey
- The recipient's private key.recipientCert
- The recipient's certificate.public CMSAuthenticatedDataInputStream(java.io.InputStream in, SymmetricKey keyEncryptionKey)
CMSAuthenticatedDataInputStream
.in
- The underlying input stream.keyEncryptionKey
- The key used to encrypt the HMAC key.public CMSAuthenticatedDataInputStream(CMSInputConnector conn, SymmetricKey keyEncryptionKey)
CMSAuthenticatedDataInputStream
.conn
- The underlying input connector.keyEncryptionKey
- The key used to encrypt the HMAC key.Method Detail |
public ASN1ObjectID getEnclosedContentType() throws java.io.IOException
getEnclosedContentType
in class CMSInputStream
java.io.IOException
- The input encoding is incorrect or an I/O error ocuurred.public void verifyMAC() throws AuthenticationException
AuthenticationException
- MAC verification failed.public int read() throws java.io.IOException
java.io.IOException
public int read(byte[] buffer, int offset, int len) throws java.io.IOException
java.io.IOException
public int available() throws java.io.IOException
java.io.IOException
public long skip(long n) throws java.io.IOException
IOException
.java.io.IOException
public boolean markSupported()
false</false>.
Returns:
false
public void mark(int readlimit)
public void reset() throws java.io.IOException
java.io.IOException
- alwayspublic void terminate() throws java.io.IOException
authenticated-data
structure.
This method must be called only after all the authenticated data has been read.
terminate
in class CMSInputStream
java.io.IOException
- An I/O error occurred or unread authenticated data is present.public OriginatorInfo getOriginatorInfo() throws java.io.IOException
null
otherwise.java.io.IOException
- An I/O error occurred or the input encoding is incorrect.public oracle.security.crypto.cert.AttributeSet getAuthenticatedAttributes() throws java.io.IOException
null
otherwise.java.io.IOException
- An I/O error occurred or the input encoding is incorrect.public oracle.security.crypto.cert.AttributeSet getUnauthenticatedAttributes() throws java.io.IOException
null
otherwise.java.io.IOException
- An I/O error occurred or the input encoding is incorrect.public java.math.BigInteger getVersionNumber() throws java.io.IOException
java.io.IOException
public ASN1Integer getVersion() throws java.io.IOException
getVersionNumber()
java.io.IOException
- An I/O error occurred or the input encoding is incorrect.public AlgorithmIdentifier getMACAlgID() throws java.io.IOException
java.io.IOException
- An I/O error occurred or the input encoding is incorrect.public AlgorithmIdentifier getDigestAlgID() throws java.io.IOException
null
otherwise.java.io.IOException
- An I/O error occurred or the input encoding is incorrect.public byte[] getMAC() throws java.io.IOException
java.io.IOException
- An I/O error occurred or the input encoding is incorrect.
|
Oracle Security Developer Tools CMS Java API Reference 10g Release 2 (10.1.2.0.2) B15564-01 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |