|
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
oracle.security.crypto.cms.CMSContentInfo
oracle.security.crypto.cms.CMSDigestedDataContentInfo
This class encapsulates a CMS object of content type digested-data
.
Constructor Summary | |
CMSDigestedDataContentInfo() Creates an empty CMSDigestedDataContentInfo . |
|
CMSDigestedDataContentInfo(CMSContentInfo contentInfo, AlgorithmIdentifier digestAlgID) Creates a CMSDigestedDataContentInfo object by computing the message digest of the given CMS object. |
|
CMSDigestedDataContentInfo(CMSContentInfo contentInfo, 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. |
AlgorithmIdentifier |
getDigestAlgID() Returns the message digest algorithm. |
CMSContentInfo |
getEnclosed() Returns the digested content. |
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. |
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, AlgorithmIdentifier digestAlgID) throws AlgorithmIdentifierException
CMSDigestedDataContentInfo
object by computing the message digest of the given CMS object.
contentInfo
- The CMS Object that is to be digested.digestAlgID
- The digest algorithm.AlgorithmIdentifierException
- The message digest algorithm is not supported.public CMSDigestedDataContentInfo(CMSContentInfo contentInfo, 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
null
for a detached CMS object.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 ASN1ObjectID getEnclosedContentType()
public AlgorithmIdentifier getDigestAlgID()
public byte[] getDigest()
public java.math.BigInteger getVersionNumber()
public ASN1Integer getVersion()
getVersionNumber()
public boolean isDetached()
isDetached
in class CMSContentInfo
true
if detached; false
otherwise.CMSContentInfo.isDetached()
public java.lang.String toString()
public int hashCode()
public boolean equals(java.lang.Object obj)
true
if this object is the same as the obj argument; false
otherwise.public void verify() throws AuthenticationException, AlgorithmIdentifierException
This method will always fail for a detached CMSDigestedDataContentInfo
Object.
AuthenticationException
- Message digest values are different.AlgorithmIdentifierException
- 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 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 |