|
Oracle Fusion Middleware CMS Java API Reference for Oracle Security Developer Tools 11g Release 1 (11.1.1) E10667-05 |
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object
oracle.security.crypto.cms.CMSContentInfo
oracle.security.crypto.cms.CMSDigestedDataContentInfo
public class CMSDigestedDataContentInfo
This class encapsulates a CMS object of content type digested-data
.
Constructor Summary | |
---|---|
CMSDigestedDataContentInfo() Creates an empty CMSDigestedDataContentInfo . |
|
CMSDigestedDataContentInfo(CMSContentInfo contentInfo, oracle.security.crypto.core.AlgorithmIdentifier digestAlgID) Creates a CMSDigestedDataContentInfo object by computing the message digest of the given CMS object. |
|
CMSDigestedDataContentInfo(CMSContentInfo contentInfo, oracle.security.crypto.core.AlgorithmIdentifier digestAlgID, byte[] digest) Creates a CMSDigestedDataContentInfo object with an already computed digest value. |
|
CMSDigestedDataContentInfo(java.io.InputStream is) Creates a CMSDigestedDataContentInfo object, by reading a BER encoding from the specified input stream. |
Method Summary | |
---|---|
boolean |
equals(java.lang.Object obj) Indicates whether some other object is "equal to" this one. |
byte[] |
getDigest() Returns the message digest value. |
oracle.security.crypto.core.AlgorithmIdentifier |
getDigestAlgID() Returns the message digest algorithm. |
CMSContentInfo |
getEnclosed() Returns the digested content. |
oracle.security.crypto.asn1.ASN1ObjectID |
getEnclosedContentType() Returns the content type of the digested content. |
protected byte[] |
getExposedContent() Returns the contents octets of the DER encoding of the content field of this CMS object. |
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. |
int |
hashCode() Returns a hash code value for this object. |
protected void |
inputContent(java.io.InputStream is) Initializes this object by reading the Content field of the CMS ContentInfo structure i.e. |
boolean |
isDetached() Indicates if this CMS object is detached. |
void |
setEnclosed(CMSContentInfo content) Set the encapsulated content i.e. |
protected void |
setExposedContent(byte[] expContent) Returns the contents octets of the DER encoding of the content field of this CMS object. |
java.lang.String |
toString() Returns a brief text description of this object. |
protected void |
update() Clears the internal output cache. |
void |
verify() Verify the Message Digest. |
void |
writeDetached(boolean writeDetached) Indicate if the CMS Object that is being digested should be omitted when creating the CMSDigestedDataContentInfo object. |
Methods inherited from class oracle.security.crypto.cms.CMSContentInfo |
---|
computeDigest, contentTypeName, getContentType, input, inputInstance, isDegenerate, length, output |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public CMSDigestedDataContentInfo()
CMSDigestedDataContentInfo
.public CMSDigestedDataContentInfo(CMSContentInfo contentInfo, oracle.security.crypto.core.AlgorithmIdentifier digestAlgID) throws java.security.NoSuchAlgorithmException
CMSDigestedDataContentInfo
object by computing the message digest of the given CMS object.
Note the change in the exception thrown
Exception no longer thrown -- AlgorithmIdentifierException
Exception introduced -- NoSuchAlgorithmException
contentInfo
- The CMS Object that is to be digested.digestAlgID
- The digest algorithm.AlgorithmIdentifierException
- The message digest algorithm is not supported.java.security.NoSuchAlgorithmException
public CMSDigestedDataContentInfo(CMSContentInfo contentInfo, oracle.security.crypto.core.AlgorithmIdentifier digestAlgID, byte[] digest)
CMSDigestedDataContentInfo
object with an already computed digest value.
contentInfo
- The CMS Object that is to be digested.digestAlgID
- The message digest algorithm.digest
- The message digest of the CMS Object.public CMSDigestedDataContentInfo(java.io.InputStream is) throws java.io.IOException
CMSDigestedDataContentInfo
object, by reading a BER encoding from the specified input stream.
is
- The input stream.java.io.IOException
- If the input is not correctly formatted, has the wrong content type; or an I/O exception occurs.Method Detail |
---|
protected void setExposedContent(byte[] expContent)
CMSContentInfo
setExposedContent
in class CMSContentInfo
CMSContentInfo.isDetached()
protected byte[] getExposedContent()
CMSContentInfo
getExposedContent
in class CMSContentInfo
null
for a detached CMS object.CMSContentInfo.isDetached()
public void writeDetached(boolean writeDetached)
CMSDigestedDataContentInfo
object.
The default (true
) is to ensure the CMS Object that is being digested is a part of the CMSDigestedDataContentInfo
object.
writeDetached
- true
ensures the CMS Object being digested is not a part of the CMSDigestedDataContentInfo
object; false
ensures that the CMS Object being digested is a part of the CMSDigestedDataContentInfo
object;public void setEnclosed(CMSContentInfo content)
This method must be called before trying to the verify the digest of a detached CMSDigestedDataContentInfo
Object.
content
- The CMS Object.isDetached()
public CMSContentInfo getEnclosed()
public oracle.security.crypto.asn1.ASN1ObjectID getEnclosedContentType()
public oracle.security.crypto.core.AlgorithmIdentifier getDigestAlgID()
public byte[] getDigest()
public java.math.BigInteger getVersionNumber()
public oracle.security.crypto.asn1.ASN1Integer getVersion()
getVersionNumber()
public boolean isDetached()
isDetached
in class CMSContentInfo
true
if detached; false
otherwise.CMSContentInfo.isDetached()
public java.lang.String toString()
toString
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
true
if this object is the same as the obj argument; false
otherwise.public void verify() throws oracle.security.crypto.core.AuthenticationException, java.security.NoSuchAlgorithmException
This method will always fail for a detached CMSDigestedDataContentInfo
Object.
Note the change in the exception thrown
Exception no longer thrown -- AlgorithmIdentifierException
Exception introduced -- NoSuchAlgorithmException
oracle.security.crypto.core.AuthenticationException
- Message digest values are different.java.security.NoSuchAlgorithmException
- Invalid digest algorithm.(CMSContentInfo,AlgorithmIdentifier,byte[])
, setEnclosed(CMSContentInfo)
protected void inputContent(java.io.InputStream is) throws java.io.IOException
CMSContentInfo
This method must be implemented by subclasses. It is unlikely that package users will ever need to call it directly.
inputContent
in class CMSContentInfo
java.io.IOException
protected void update()
update
in class CMSContentInfo
|
Oracle Fusion Middleware CMS Java API Reference for Oracle Security Developer Tools 11g Release 1 (11.1.1) E10667-05 |
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |