|
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.CMSRecipientInfo
oracle.security.crypto.cms.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(SymmetricKey contentEncryptionKey, AlgorithmIdentifier contentEncryptionKeyAlgID, CMSKEKRecipientInfoSpec ri) Creates a CMSKEKRecipientInfo . |
|
CMSKEKRecipientInfo(SymmetricKey contentEncryptionKey, CMSKEKRecipientInfoSpec ri) Creates a CMSKEKRecipientInfo . |
Method Summary | |
byte[] |
getContentAuthenticationKey(SymmetricKey keyDecryptionKey) Returns the encryption key. |
SymmetricKey |
getContentEncryptionKey(SymmetricKey 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. |
AlgorithmIdentifier |
getKeyEncryptionAlgID() Returns the key encryption (wrap) algorithm. |
CMSKEKRecipientInfoSpec |
getRecipientInfoSpec() Returns the CMSKEKRecipientInfoSpec object. |
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(SymmetricKey contentEncryptionKey, CMSKEKRecipientInfoSpec ri) throws CipherException, InvalidKeyException, InvalidInputException, AlgorithmIdentifierException
CMSKEKRecipientInfo
.contentEncryptionKey
- The content encryption key.ri
- The key encryption (wrap) information.CipherException
- An error occurred during encryption.InvalidKeyException
- The encrytion key is invalid.InvalidInputException
- Input is invalid.AlgorithmIdentifierException
- The algorithm is not supported.CMSKEKRecipientInfoSpec
public CMSKEKRecipientInfo(SymmetricKey contentEncryptionKey, AlgorithmIdentifier contentEncryptionKeyAlgID, CMSKEKRecipientInfoSpec ri) throws CipherException, InvalidKeyException, InvalidInputException, AlgorithmIdentifierException
CMSKEKRecipientInfo
.contentEncryptionKey
- The content encryption key.contentEncryptionKeyAlgID
- The content encrypton key algorithmri
- The key encryption (wrap) information.CipherException
- An error occurred during encryption.InvalidKeyException
- The encrytion key is invalid.InvalidInputException
- Input is invalid.AlgorithmIdentifierException
- The algorithm is not supported.CMSKEKRecipientInfoSpec
Method Detail |
public CMSKEKRecipientInfoSpec getRecipientInfoSpec()
CMSKEKRecipientInfoSpec
object.public AlgorithmIdentifier getKeyEncryptionAlgID()
public byte[] getEncryptedKey()
public java.math.BigInteger getVersionNumber()
public ASN1Integer getVersion()
getVersionNumber()
getVersion
in class CMSRecipientInfo
public SymmetricKey getContentEncryptionKey(SymmetricKey keyDecryptionKey) throws AlgorithmIdentifierException, InvalidInputException, InvalidKeyException, CipherException
keyDecryptionKey
- the key decryption key.AlgorithmIdentifierException
- The algorithm identifier contained in this RecipientInfo is not valid.InvalidKeyException
- The key decryption key could not be used.CipherException
- An error occured during decryption.InvalidInputException
- An error occurred.public byte[] getContentAuthenticationKey(SymmetricKey keyDecryptionKey) throws AlgorithmIdentifierException, InvalidInputException, InvalidKeyException, CipherException
AlgorithmIdentifierException
- The algorithm identifier in the RecipientInfo is not valid.InvalidKeyException
- The key decryption key could not be used.CipherException
- An error occured during decryption.InvalidInputException
- An error occurred.protected 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
java.io.IOException
- An I/O error occurred.public int length()
public java.lang.String toString()
|
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 |