|
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.CMSEncryptedDataContentInfo
This class encapsulates a CMS object of content type encrypted-data
.
Constructor Summary | |
CMSEncryptedDataContentInfo() Creates an empty CMSEncryptedDataContentInfo . |
|
CMSEncryptedDataContentInfo(CMSContentInfo contentInfo, SymmetricKey contentEncryptionKey, AlgorithmIdentifier contentEncryptionAlgID) Creates a CMSEncryptedDataContentInfo . |
|
CMSEncryptedDataContentInfo(CMSContentInfo contentInfo, SymmetricKey contentEncryptionKey, AlgorithmIdentifier contentEncryptionAlgID, oracle.security.crypto.cert.AttributeSet unprotectedAttributes) Creates a CMSEncryptedDataContentInfo . |
|
CMSEncryptedDataContentInfo(java.io.InputStream is) Creates a CMSEncryptedDataContentInfo CMS 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. |
AlgorithmIdentifier |
getContentEncryptionAlgID() Returns the content encryption algorithm. |
CMSContentInfo |
getEnclosed(SymmetricKey decryptionKey) Returns the decrypted content. |
ASN1ObjectID |
getEnclosedContentType() Returns the content type of the Encrypted Content. |
byte[] |
getEncryptedContent() Returns the encrypted content. |
protected byte[] |
getExposedContent() Returns the contents octets of the DER encoding of the content field of this CMS object. |
oracle.security.crypto.cert.AttributeSet |
getUnprotectedAttributes() Returns the Set of Unprotected Attributes. |
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() Indicate if this is a detached CMS object. |
void |
setEnclosed(byte[] encryptedContent) Sets the encrypted content. |
protected void |
setExposedContent(byte[] expContent) Returns the contents octets of the DER encoding of the content field of this CMS object. |
void |
setUnprotectedAttributes(oracle.security.crypto.cert.AttributeSet unprotectedAttributes) Sets the Unprotected Attributes. |
java.lang.String |
toString() Returns a brief text description of this object. |
protected void |
update() Clears the internal output cache. |
void |
writeDetached(boolean writeDetachedObject) Indicate if the encryptedContent will be a part of the EncryptedContentInfo structure in this object's output encoding. |
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 CMSEncryptedDataContentInfo()
CMSEncryptedDataContentInfo
.public CMSEncryptedDataContentInfo(CMSContentInfo contentInfo, SymmetricKey contentEncryptionKey, AlgorithmIdentifier contentEncryptionAlgID) throws CipherException, AlgorithmIdentifierException, InvalidKeyException
CMSEncryptedDataContentInfo
.contentInfo
- The CMS Object to encrypt.contentEncryptionKey
- The content encryption key.contentEncryptionAlgID
- The content encryption algorithm.AlgorithmIdentifierException
- The encryption algorithm is not supported.CipherException
- An error occurred during decryption.InvalidKeyException
- The content encryption key is invalid.public CMSEncryptedDataContentInfo(CMSContentInfo contentInfo, SymmetricKey contentEncryptionKey, AlgorithmIdentifier contentEncryptionAlgID, oracle.security.crypto.cert.AttributeSet unprotectedAttributes) throws CipherException, AlgorithmIdentifierException, InvalidKeyException
CMSEncryptedDataContentInfo
.contentInfo
- The CMS Object to encrypt.contentEncryptionKey
- The content encryption key.contentEncryptionAlgID
- The content encryption algorithm.unprotectedAttributes
- The set of unprotected attributes.AlgorithmIdentifierException
- The encryption algorithm is not supported.CipherException
- An error occurred during decryption.InvalidKeyException
- The content encryption key is invalid.public CMSEncryptedDataContentInfo(java.io.InputStream is) throws java.io.IOException
CMSEncryptedDataContentInfo
CMS 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 or an I/O error occurred or the input content type is not supported.Method Detail |
public void writeDetached(boolean writeDetachedObject)
writeDetachedObject
- If true
the encryptedContent will be omitted; false
otherwise.public boolean isDetached()
isDetached
in class CMSContentInfo
true
if the encrypted content is not present; false
otherwise.CMSContentInfo.isDetached()
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 ASN1ObjectID getEnclosedContentType()
public AlgorithmIdentifier getContentEncryptionAlgID()
public byte[] getEncryptedContent()
public java.math.BigInteger getVersionNumber()
public ASN1Integer getVersion()
getVersionNumber()
public oracle.security.crypto.cert.AttributeSet getUnprotectedAttributes()
null
otherwise.public void setUnprotectedAttributes(oracle.security.crypto.cert.AttributeSet unprotectedAttributes)
unprotectedAttributes
- The unprotected attributes.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 setEnclosed(byte[] encryptedContent)
encryptedContent
- The encrypted content.public CMSContentInfo getEnclosed(SymmetricKey decryptionKey) throws AlgorithmIdentifierException, InvalidKeyException, CipherException, InvalidInputException
decryptionKey
- The decryption key.AlgorithmIdentifierException
- The encryption algorithm is not supported.InvalidKeyException
- The decryption key is invalid.CipherException
- An error occurred during decryption.InvalidInputException
- The content is incorrectly encoded or an I/O error occurred.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 |