|
IAIK CMS/SMIME Toolkit API Documentation
Version 6.1 |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectiaik.cms.OtherRecipientInfoValue
iaik.cms.UnknownOtherRecipientInfoValue
public class UnknownOtherRecipientInfoValue
This class implements any unknown OtherRecipientInfo value. It tries to show as much information as possible about the OtherRecipientInfo value.
An Unknown OtherRecipientInfo value is a OtherRecipientInfo value for which there
exists no registered
implementation.
When decoding a the OtherRecipientInfo value contained in an OtherRecipientInfo from its ASN.1 representation
a descendant of OtherRecipientInfoValue is created
if there exists a registered
implementation of the OtherRecipientInfo value identified by the
key manegement type OID. If no implementation exists, an
UnknownOtherRecipientInfoValue is returned allowing to get and parse the ASN.1 representation of the OtherRecipientInfo
value. Any other methods like encryptKey or decryptKey inherited
from class RecipientInfo are implemented as dummys
since it cannot be supported by this general unknown OtherRecipientInfo.
RecipientInfo,
OtherRecipientInfo| Field Summary |
|---|
| Fields inherited from class iaik.cms.OtherRecipientInfoValue |
|---|
keyEncryptionAlgorithm_, securityProvider_ |
| Constructor Summary | |
|---|---|
UnknownOtherRecipientInfoValue(iaik.asn1.ObjectID type)
Creates a new unknown OtherRecipientInfo value from the given object identifier. |
|
| Method Summary | |
|---|---|
void |
decode(iaik.asn1.ASN1Object obj)
Reads the ASN.1 representation of the unknown OtherRecipientInfo value. |
javax.crypto.SecretKey |
decryptKey(java.security.Key key,
KeyIdentifier recipientIdentifier,
java.lang.String cekAlgName)
Attention! |
void |
encryptKey(javax.crypto.SecretKey cek)
Attention! |
byte[] |
getEncryptedKey(KeyIdentifier recipientIdentifier)
Attention! |
KeyIdentifier[] |
getRecipientIdentifiers()
Attention! |
iaik.asn1.ObjectID |
getType()
Returns the OtherRecipientInfo type the unknown OtherRecipientInfo value belongs to. |
boolean |
isRecipientInfoFor(KeyIdentifier recipientIdentifier)
Attention! |
CertificateIdentifier |
isRecipientInfoFor(iaik.x509.X509Certificate recipientCertificate)
Attention! |
iaik.asn1.ASN1Object |
toASN1Object()
Returns an ASN1Object representing this unknown OtherRecipientInfo value. |
java.lang.String |
toString()
Returns a string that represents the contents of this unknown OtherRecipientInfo value. |
| Methods inherited from class iaik.cms.OtherRecipientInfoValue |
|---|
getKeyEncryptionAlgorithm, getName, getSecurityProvider, setSecurityProvider |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public UnknownOtherRecipientInfoValue(iaik.asn1.ObjectID type)
type - the OID identifying the type the unknown OtherRecipientInfo value belongs to| Method Detail |
|---|
public iaik.asn1.ObjectID getType()
getType in class OtherRecipientInfoValuepublic void decode(iaik.asn1.ASN1Object obj)
obj - the ASN1Object representing the unknown OtherRecipientInfo valuepublic iaik.asn1.ASN1Object toASN1Object()
public void encryptKey(javax.crypto.SecretKey cek)
throws CMSException
encryptKey in class OtherRecipientInfoValuecek - the symmetric content encryption key to encrypt
CMSException - if the key encryption process fails for some
reason (e.g. the key-encryption algortihm used
by this RecipientInfo is not implemented,
or the recipient key is invalid, ...)
public javax.crypto.SecretKey decryptKey(java.security.Key key,
KeyIdentifier recipientIdentifier,
java.lang.String cekAlgName)
null in any case.
decryptKey in class OtherRecipientInfoValuekey - the recipient key used to decrypt the encrypted content-encryption key.recipientIdentifier - information to be used for getting the right encrypted content
encryption key for the right recipientcekAlgName - the name of the content encryption key (e.g. "AES") to be set for the
SecretKey object created by this method
null
public byte[] getEncryptedKey(KeyIdentifier recipientIdentifier)
throws CMSException
null in any case.
getEncryptedKey in class OtherRecipientInfoValuerecipientIdentifier - information to be used for getting the right encrypted content
encryption key for the right recipient; may be required if this
RecipientInfo holds content encryption keys for more than one
recipient (see KeyAgreeRecipientInfo)
null
CMSException - if no recipient with this key identifier is includedpublic KeyIdentifier[] getRecipientIdentifiers()
getRecipientIdentifiers in class OtherRecipientInfoValuepublic boolean isRecipientInfoFor(KeyIdentifier recipientIdentifier)
false in any case.
isRecipientInfoFor in class OtherRecipientInfoValuerecipientIdentifier - the key identifier belonging to the recipient
we are searching for
falsepublic CertificateIdentifier isRecipientInfoFor(iaik.x509.X509Certificate recipientCertificate)
null in any case.
isRecipientInfoFor in class OtherRecipientInfoValuerecipientCertificate - the certificate of the recipient
nullpublic java.lang.String toString()
toString in class java.lang.Object
|
IAIK CMS/SMIME Toolkit API Documentation
Version 6.1 |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
|
v6.1 (c) 2002 IAIK, (c) 2003 - 2025 SIC |
|