|
Oracle Fusion Middleware CMS Java API Reference for Oracle Security Developer Tools 11g Release 1 (11.1.1) E10667-04 |
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object
oracle.security.crypto.cms.CMSRecipientInfo
oracle.security.crypto.cms.CMSKEKRecipientInfo
public class CMSKEKRecipientInfo
This class encapsulates recipient information using the symmetric key encryption (wrapping) key exchange mechanism.
Please note that mixed key encryption and content encryption algorithms are not supported.
Please be aware that using the otherKeyAttribute field of the KEKIdentifier structure can cause interoperability problems. To process the otherKeyAttribute field, use the oracle.security.crypto.asn1
package.
CMSRecipientInfo
, CMSKEKRecipientInfoSpec
Constructor Summary | |
---|---|
CMSKEKRecipientInfo() Creates an empty CMSKEKRecipientInfo . |
|
CMSKEKRecipientInfo(byte[] contentEncryptionKey, oracle.security.crypto.core.AlgorithmIdentifier contentEncryptionAlgID, CMSKEKRecipientInfoSpec ri) Creates a CMSKEKRecipientInfo . |
|
CMSKEKRecipientInfo(javax.crypto.SecretKey contentEncryptionKey, oracle.security.crypto.core.AlgorithmIdentifier contentEncryptionKeyAlgID, CMSKEKRecipientInfoSpec ri) Creates a CMSKEKRecipientInfo . |
|
CMSKEKRecipientInfo(javax.crypto.SecretKey contentEncryptionKey, CMSKEKRecipientInfoSpec ri) Creates a CMSKEKRecipientInfo . |
Method Summary | |
---|---|
java.lang.String |
getContentAuthenticationAlgID() |
byte[] |
getContentAuthenticationKey(javax.crypto.SecretKey keyDecryptionKey) Returns the encryption key. |
javax.crypto.SecretKey |
getContentEncryptionKey(javax.crypto.SecretKey keyDecryptionKey) Derives the content encryption key, by decryption the encrypted key stored in this object with the given key decryption key. |
byte[] |
getEncryptedKey() Returns the encrypted key. |
oracle.security.crypto.core.AlgorithmIdentifier |
getKeyEncryptionAlgID() Returns the key encryption (wrap) algorithm. |
CMSKEKRecipientInfoSpec |
getRecipientInfoSpec() Returns the CMSKEKRecipientInfoSpec 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. |
protected void |
inputRecipientInfo(java.io.InputStream is) Reads the CMSRecipientInfo structure. |
int |
length() Returns the length of this object's encoding. |
void |
output(java.io.OutputStream os) Write this object's encoding to the specified output stream. |
java.lang.String |
toString() Returns a brief text description of this object. |
Methods inherited from class oracle.security.crypto.cms.CMSRecipientInfo |
---|
input, inputInstance |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public CMSKEKRecipientInfo()
CMSKEKRecipientInfo
.public CMSKEKRecipientInfo(byte[] contentEncryptionKey, oracle.security.crypto.core.AlgorithmIdentifier contentEncryptionAlgID, CMSKEKRecipientInfoSpec ri) throws java.security.InvalidKeyException, javax.crypto.BadPaddingException, javax.crypto.IllegalBlockSizeException, javax.crypto.NoSuchPaddingException, java.security.NoSuchAlgorithmException, java.security.InvalidAlgorithmParameterException, java.security.spec.InvalidKeySpecException
CMSKEKRecipientInfo
.
contentEncryptionKey
- The content encryption key bytes.contentEncryptionAlgID
- The content Encryption algorithm identifierri
- The key encryption (wrap) information.java.security.InvalidKeyException
- The encrytion key is invalid.javax.crypto.NoSuchPaddingException
- Padding mechanism not supportedjava.security.NoSuchAlgorithmException
- Algorithm Not supportedjavax.crypto.BadPaddingException
- Expected padding in the input not foundjavax.crypto.IllegalBlockSizeException
- Invalid Block size (Cipher)java.security.spec.InvalidKeySpecException
- The key specifications not validjava.security.InvalidAlgorithmParameterException
- The algorithm parameters not validpublic CMSKEKRecipientInfo(javax.crypto.SecretKey contentEncryptionKey, CMSKEKRecipientInfoSpec ri) throws java.security.InvalidKeyException, oracle.security.crypto.util.InvalidInputException, java.security.NoSuchAlgorithmException, javax.crypto.BadPaddingException, javax.crypto.IllegalBlockSizeException, javax.crypto.NoSuchPaddingException, java.security.InvalidAlgorithmParameterException, java.security.spec.InvalidKeySpecException
CMSKEKRecipientInfo
.
Note the changes in the Method signature
Previously public CMSKEKRecipientInfo (SymmetricKey , CMSKEKRecipientInfoSpec )
Nowpublic CMSKEKRecipientInfo (SecretKey , CMSKEKRecipientInfoSpec )
Note the changes in exceptions Exceptions no longer thrown -- CipherException ,AlgorithmIdentifierException Exceptions introduced -- NoSuchAlgorithmException , BadPaddingException , IllegalBlockSizeException,NoSuchPaddingException, InvalidAlgorithmParameterException,InvalidKeySpecException
contentEncryptionKey
- The content encryption key.ri
- The key encryption (wrap) information.java.security.InvalidKeyException
- The encrytion key is invalid.oracle.security.crypto.util.InvalidInputException
- Input is invalid.javax.crypto.NoSuchPaddingException
- Padding mechanism not supportedjava.security.NoSuchAlgorithmException
- Algorithm Not supportedjavax.crypto.BadPaddingException
- Expected padding in the input not foundjavax.crypto.IllegalBlockSizeException
- Invalid Block size (Cipher)java.security.spec.InvalidKeySpecException
- The key specifications not validjava.security.InvalidAlgorithmParameterException
- The algorithm parameters not validCMSKEKRecipientInfoSpec
public CMSKEKRecipientInfo(javax.crypto.SecretKey contentEncryptionKey, oracle.security.crypto.core.AlgorithmIdentifier contentEncryptionKeyAlgID, CMSKEKRecipientInfoSpec ri) throws java.security.InvalidKeyException, oracle.security.crypto.util.InvalidInputException, java.security.NoSuchAlgorithmException, javax.crypto.IllegalBlockSizeException, javax.crypto.BadPaddingException, javax.crypto.NoSuchPaddingException, java.security.InvalidAlgorithmParameterException, java.security.spec.InvalidKeySpecException
CMSKEKRecipientInfo
.
Note the changes in the Method signature
Previously public CMSKEKRecipientInfo (SymmetricKey ,AlgorithmIdentifier , CMSKEKRecipientInfoSpec )
Nowpublic CMSKEKRecipientInfo (SecretKey ,AlgorithmIdentifier , CMSKEKRecipientInfoSpec )
Note the changes in exceptions Exceptions no longer thrown -- CipherException ,AlgorithmIdentifierException Exceptions introduced -- NoSuchAlgorithmException , BadPaddingException , IllegalBlockSizeException,NoSuchPaddingException, InvalidAlgorithmParameterException,InvalidKeySpecException
contentEncryptionKey
- The content encryption key.contentEncryptionKeyAlgID
- The content encrypton key algorithmri
- The key encryption (wrap) information.java.security.InvalidKeyException
- The encrytion key is invalid.oracle.security.crypto.util.InvalidInputException
- Input is invalid.javax.crypto.NoSuchPaddingException
- Padding mechanism not supportedjava.security.NoSuchAlgorithmException
- Algorithm Not supportedjavax.crypto.BadPaddingException
- Expected padding in the input not foundjavax.crypto.IllegalBlockSizeException
- Invalid Block size (Cipher)java.security.spec.InvalidKeySpecException
- The key specifications not validjava.security.InvalidAlgorithmParameterException
- The algorithm parameters not validCMSKEKRecipientInfoSpec
Method Detail |
---|
public java.lang.String getContentAuthenticationAlgID()
public CMSKEKRecipientInfoSpec getRecipientInfoSpec()
CMSKEKRecipientInfoSpec
object.public oracle.security.crypto.core.AlgorithmIdentifier getKeyEncryptionAlgID()
public byte[] getEncryptedKey()
public java.math.BigInteger getVersionNumber()
public oracle.security.crypto.asn1.ASN1Integer getVersion()
getVersionNumber()
getVersion
in class CMSRecipientInfo
public javax.crypto.SecretKey getContentEncryptionKey(javax.crypto.SecretKey keyDecryptionKey) throws oracle.security.crypto.util.InvalidInputException, java.security.InvalidKeyException, java.security.NoSuchAlgorithmException, javax.crypto.BadPaddingException, javax.crypto.IllegalBlockSizeException, javax.crypto.NoSuchPaddingException, java.security.InvalidAlgorithmParameterException, java.security.spec.InvalidKeySpecException
Note the changes in the Method signature
Previously public SymmetricKey getContentEncryptionKey (SymmetricKey )
Now public SecretKey getContentEncryptionKey (SecretKey )
Note the changes in exceptions Exceptions no longer thrown -- CipherException ,AlgorithmIdentifierException Exceptions introduced -- NoSuchAlgorithmException , BadPaddingException , IllegalBlockSizeException,NoSuchPaddingException, InvalidAlgorithmParameterException,InvalidKeySpecException
keyDecryptionKey
- the key decryption key.java.security.InvalidKeyException
- The key decryption key could not be used.oracle.security.crypto.util.InvalidInputException
- An error occurred.javax.crypto.NoSuchPaddingException
- Padding mechanism not supportedjava.security.NoSuchAlgorithmException
- Algorithm Not supportedjavax.crypto.BadPaddingException
- Expected padding in the input not foundjavax.crypto.IllegalBlockSizeException
- Invalid Block size (Cipher)java.security.spec.InvalidKeySpecException
- The key specifications not validjava.security.InvalidAlgorithmParameterException
- The algorithm parameters not validpublic byte[] getContentAuthenticationKey(javax.crypto.SecretKey keyDecryptionKey) throws oracle.security.crypto.util.InvalidInputException, java.security.InvalidKeyException, java.security.NoSuchAlgorithmException, javax.crypto.BadPaddingException, javax.crypto.IllegalBlockSizeException, javax.crypto.NoSuchPaddingException, java.security.InvalidAlgorithmParameterException, java.security.spec.InvalidKeySpecException
Note the changes in the Method signature
Previously public SymmetricKey getContentAuthenticationKey (SymmetricKey )
Now public SecretKey getContentAuthenticationKey (SecretKey )
Note the changes in exceptions Exceptions no longer thrown -- CipherException ,AlgorithmIdentifierException Exceptions introduced -- NoSuchAlgorithmException , BadPaddingException , IllegalBlockSizeException,NoSuchPaddingException, InvalidAlgorithmParameterException,InvalidKeySpecException
keyDecryptionKey
- the key decryption key.java.security.InvalidKeyException
- The key decryption key could not be used.oracle.security.crypto.util.InvalidInputException
- An error occurred.javax.crypto.NoSuchPaddingException
- Padding mechanism not supportedjava.security.NoSuchAlgorithmException
- Algorithm Not supportedjavax.crypto.BadPaddingException
- Expected padding in the input not foundjavax.crypto.IllegalBlockSizeException
- Invalid Block size (Cipher)java.security.spec.InvalidKeySpecException
- The key specifications not validjava.security.InvalidAlgorithmParameterException
- The algorithm parameters not validprotected void inputRecipientInfo(java.io.InputStream is) throws java.io.IOException
CMSRecipientInfo
The input stream is positioned at the beginning of the tag octet of the SEQUENCE encoding.
inputRecipientInfo
in class CMSRecipientInfo
is
- The input stream.java.io.IOException
- The encoding is incorrect or an I/O error occurs.public void output(java.io.OutputStream os) throws java.io.IOException
out
- The output stream.java.io.IOException
- An I/O error occurred.public int length()
public java.lang.String toString()
toString
in class java.lang.Object
|
Oracle Fusion Middleware CMS Java API Reference for Oracle Security Developer Tools 11g Release 1 (11.1.1) E10667-04 |
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |