|
Oracle Fusion Middleware CMS Java API Reference for Oracle Security Developer Tools 11g Release 1 (11.1.1) E10667-03 |
|||||||
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
public class CMSEncryptedDataContentInfo
This class encapsulates a CMS object of content type encrypted-data
.
Constructor Summary | |
---|---|
CMSEncryptedDataContentInfo() Creates an empty CMSEncryptedDataContentInfo . |
|
CMSEncryptedDataContentInfo(CMSContentInfo contentInfo, javax.crypto.SecretKey contentEncryptionKey, oracle.security.crypto.core.AlgorithmIdentifier contentEncryptionAlgID) Creates a CMSEncryptedDataContentInfo . |
|
CMSEncryptedDataContentInfo(CMSContentInfo contentInfo, javax.crypto.SecretKey contentEncryptionKey, oracle.security.crypto.core.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. |
oracle.security.crypto.core.AlgorithmIdentifier |
getContentEncryptionAlgID() Returns the content encryption algorithm. |
CMSContentInfo |
getEnclosed(javax.crypto.SecretKey decryptionKey) Returns the decrypted content. |
oracle.security.crypto.asn1.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. |
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() 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, javax.crypto.SecretKey contentEncryptionKey, oracle.security.crypto.core.AlgorithmIdentifier contentEncryptionAlgID) throws java.security.NoSuchAlgorithmException, java.security.InvalidKeyException, javax.crypto.NoSuchPaddingException, javax.crypto.IllegalBlockSizeException, javax.crypto.BadPaddingException
CMSEncryptedDataContentInfo
.
Note the changes in the Method signature
Previouslypublic CMSEncryptedDataContentInfo (CMSContentInfo , SymmetricKey, AlgorithmIdentifier )
Nowpublic CMSEncryptedDataContentInfo (CMSContentInfo , SecretKey, AlgorithmIdentifier )
Note the changes in exceptions Exceptions no longer thrown -- AlgorithmIdentifierException , CipherException Exceptions included -- NoSuchAlgorithmException, NoSuchPaddingException,IllegalBlockSizeException, BadPaddingException
contentInfo
- The CMS Object to encrypt.contentEncryptionKey
- The content encryption key.contentEncryptionAlgID
- The content encryption algorithm.java.security.NoSuchAlgorithmException
- The encryption algorithm is not supported.java.security.InvalidKeyException
- The content encryption key is invalid.javax.crypto.NoSuchPaddingException
- The padding mechanism not supportedjavax.crypto.BadPaddingException
- The required padding not foundjavax.crypto.IllegalBlockSizeException
- Block size is invalide (Cipher)public CMSEncryptedDataContentInfo(CMSContentInfo contentInfo, javax.crypto.SecretKey contentEncryptionKey, oracle.security.crypto.core.AlgorithmIdentifier contentEncryptionAlgID, oracle.security.crypto.cert.AttributeSet unprotectedAttributes) throws java.security.NoSuchAlgorithmException, java.security.InvalidKeyException, javax.crypto.NoSuchPaddingException, javax.crypto.IllegalBlockSizeException, javax.crypto.BadPaddingException
CMSEncryptedDataContentInfo
.
Note the changes in the Method signature
Previouslypublic CMSEncryptedDataContentInfo (CMSContentInfo , SymmetricKey , AlgorithmIdentifier ,AttributeSet )
Nowpublic CMSEncryptedDataContentInfo (CMSContentInfo , SecretKey , AlgorithmIdentifier ,AttributeSet )
Note the changes in exceptions Exceptions no longer thrown -- AlgorithmIdentifierException , CipherException Exceptions included -- NoSuchAlgorithmException, NoSuchPaddingException,IllegalBlockSizeException, BadPaddingException
contentInfo
- The CMS Object to encrypt.contentEncryptionKey
- The content encryption key.contentEncryptionAlgID
- The content encryption algorithm.unprotectedAttributes
- The set of unprotected attributes.java.security.NoSuchAlgorithmException
- The encryption algorithm is not supported.java.security.InvalidKeyException
- The content encryption key is invalid.javax.crypto.NoSuchPaddingException
- The padding mechanism not supportedjavax.crypto.BadPaddingException
- The required padding not foundjavax.crypto.IllegalBlockSizeException
- Block size is invalide (Cipher)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
CMSContentInfo.isDetached()
protected byte[] getExposedContent()
CMSContentInfo
getExposedContent
in class CMSContentInfo
null
for a detached CMS object.CMSContentInfo.isDetached()
public oracle.security.crypto.asn1.ASN1ObjectID getEnclosedContentType()
public oracle.security.crypto.core.AlgorithmIdentifier getContentEncryptionAlgID()
public byte[] getEncryptedContent()
public java.math.BigInteger getVersionNumber()
public oracle.security.crypto.asn1.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()
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 setEnclosed(byte[] encryptedContent)
encryptedContent
- The encrypted content.public CMSContentInfo getEnclosed(javax.crypto.SecretKey decryptionKey) throws java.security.NoSuchAlgorithmException, java.security.InvalidKeyException, oracle.security.crypto.util.InvalidInputException, javax.crypto.BadPaddingException, javax.crypto.IllegalBlockSizeException, javax.crypto.NoSuchPaddingException
CMSEncryptedDataContentInfo
.
Note the changes in the Method signature
Previouslypublic CMSContentInfo getEnclosed (SymmetricKey decryptionKey)
Nowpublic CMSContentInfo getEnclosed (SecretKey decryptionKey)
Note the changes in exceptions Exceptions no longer thrown -- AlgorithmIdentifierException , CipherException Exceptions included -- NoSuchAlgorithmException, NoSuchPaddingException,IllegalBlockSizeException, BadPaddingException
decryptionKey
- The decryption key.oracle.security.crypto.util.InvalidInputException
- The content is incorrectly encoded or an I/O error occurred.java.security.NoSuchAlgorithmException
- The encryption algorithm is not supported.java.security.InvalidKeyException
- The content encryption key is invalid.javax.crypto.NoSuchPaddingException
- The padding mechanism not supportedjavax.crypto.BadPaddingException
- The required padding not foundjavax.crypto.IllegalBlockSizeException
- Block size is invalide (Cipher)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-03 |
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |