|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object iaik.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(ObjectID type)
Creates a new unknown OtherRecipientInfo value from the given object identifier. |
Method Summary | |
---|---|
void |
decode(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! |
ObjectID |
getType()
Returns the OtherRecipientInfo type the unknown OtherRecipientInfo value belongs to. |
boolean |
isRecipientInfoFor(KeyIdentifier recipientIdentifier)
Attention! |
CertificateIdentifier |
isRecipientInfoFor(X509Certificate recipientCertificate)
Attention! |
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(ObjectID type)
type
- the OID identifying the type the unknown OtherRecipientInfo value belongs toMethod Detail |
---|
public ObjectID getType()
getType
in class OtherRecipientInfoValue
public void decode(ASN1Object obj)
obj
- the ASN1Object representing the unknown OtherRecipientInfo valuepublic ASN1Object toASN1Object()
public void encryptKey(javax.crypto.SecretKey cek) throws CMSException
encryptKey
in class OtherRecipientInfoValue
cek
- 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 OtherRecipientInfoValue
key
- 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 OtherRecipientInfoValue
recipientIdentifier
- 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 OtherRecipientInfoValue
public boolean isRecipientInfoFor(KeyIdentifier recipientIdentifier)
false
in any case.
isRecipientInfoFor
in class OtherRecipientInfoValue
recipientIdentifier
- the key identifier belonging to the recipient
we are searching for
false
public CertificateIdentifier isRecipientInfoFor(X509Certificate recipientCertificate)
null
in any case.
isRecipientInfoFor
in class OtherRecipientInfoValue
recipientCertificate
- the certificate of the recipient
null
public java.lang.String toString()
toString
in class java.lang.Object
|
This Javadoc may contain text parts from text parts from IETF Internet Standard specifications (see copyright note). | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |