|
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.KEKIdentifier
public class KEKIdentifier
The CMS type KEKIdentifier.
The KEKIdentifier type is used for identifying a symmetric key-encryption key previously distributed to the sender and one or more recipients. The symmetric key-encryption key is identified by an OCTET STRING key id and optional date (for identifiying a single key-encryption key from a set of previously distrbuted keys) and optional other key material; see RFC 5652:
KEKIdentifier ::= SEQUENCE {
keyIdentifier OCTET STRING,
date GeneralizedTime OPTIONAL,
other OtherKeyAttribute OPTIONAL }
The use of OtherKeyAttribute should be avoided because of
interoperability reasons.
| Field Summary |
|---|
| Fields inherited from interface iaik.cms.KeyIdentifier |
|---|
ISSUER_AND_SERIALNUMBER, KEK_IDENTIFIER, ORIGINATOR_PUBLIC_KEY, RECIPIENT_KEY_IDENTIFIER, SUBJECT_KEY_IDENTIFIER |
| Constructor Summary | |
|---|---|
KEKIdentifier()
Empty default constructor. |
|
KEKIdentifier(iaik.asn1.ASN1Object obj)
Creates a KEKIdentifier from an ASN1Object. |
|
KEKIdentifier(byte[] keyIdentifier)
Creates a KEKIdentifier from the given keyIdentifier. |
|
| Method Summary | |
|---|---|
void |
decode(iaik.asn1.ASN1Object obj)
Decodes the KEKIdentifier from the given ASN1Object. |
boolean |
equals(java.lang.Object obj)
Compares this KEKIdentifier to the specified object. |
java.util.Date |
getDate()
Gets the optional Date value. |
byte[] |
getKeyIdentifier()
Gets the key identifier. |
int |
getKeyIdType()
Returns the key identifier type this class represents. |
java.lang.String |
getKeyIdTypeName()
Returns the key identifier type this class represents as string. |
OtherKeyAttribute |
getOtherKeyAttribute()
Gets the optional OtherKeyAttribute component value. |
boolean |
hasDate(java.util.Date date)
Checks if this KEKIdentifier holds the given Date. |
int |
hashCode()
Returns a hashcode for this KEKIdentifier. |
boolean |
hasKeyIdentifier(byte[] keyIdentifier)
Checks if this KEKIdentifier holds the given key identifier. |
boolean |
hasOtherKeyAttribute(OtherKeyAttribute otherKeyAttribute)
Checks if this KEKIdentifier holds the given OtherKeyAttribute. |
void |
setDate(java.util.Date date)
Sets the optional Date component. |
void |
setOtherKeyAttribute(OtherKeyAttribute other)
Sets the optional OtherKeyAttribute component. |
iaik.asn1.ASN1Object |
toASN1Object()
Returns this KEKIdentifier as ASN1Object. |
java.lang.String |
toString()
Returns a String representation of this KEKIdentifier. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public KEKIdentifier()
Used for dynamic object creation only. Shall be not used by an application.
public KEKIdentifier(byte[] keyIdentifier)
keyIdentifier - the key identifier as byte array
public KEKIdentifier(iaik.asn1.ASN1Object obj)
throws iaik.asn1.CodingException
obj - the KEKIdentifier as ASN1Object
iaik.asn1.CodingException - if the ASN1Object cannot be decoded or
is invalid structured| Method Detail |
|---|
public void setDate(java.util.Date date)
date - the Date optionally identifying a key-encryption key
from a set of previously distributed keyspublic void setOtherKeyAttribute(OtherKeyAttribute other)
other - additional information for identifying the keypublic java.util.Date getDate()
public OtherKeyAttribute getOtherKeyAttribute()
public byte[] getKeyIdentifier()
public void decode(iaik.asn1.ASN1Object obj)
throws iaik.asn1.CodingException
decode in interface iaik.asn1.ASN1Typeobj - the KEKIdentifier as ASN1Object
iaik.asn1.CodingException - if the ASN1Object cannot be decoded or
is invalid structuredpublic iaik.asn1.ASN1Object toASN1Object()
toASN1Object in interface iaik.asn1.ASN1Typepublic boolean hasKeyIdentifier(byte[] keyIdentifier)
true if the key identifier value of this KEKIdentifier is
equal to the supplied keyIdentifer, false otherwisepublic boolean hasDate(java.util.Date date)
true if the Date component of this KEKIdentifier is
equal to the supplied Date, false otherwisepublic boolean hasOtherKeyAttribute(OtherKeyAttribute otherKeyAttribute)
true if the OtherKeyAttribute component of this KEKIdentifier
is equal to the supplied OtherKeyAttribute, false otherwisepublic boolean equals(java.lang.Object obj)
KEKIdentifier to the specified object.
equals in interface KeyIdentifierequals in class java.lang.Objectobj - the object to compare this KEKIdentifier
against.
true, if the given object is equal to this
KEKIdentifier,
false otherwisepublic int hashCode()
KEKIdentifier.
hashCode in interface KeyIdentifierhashCode in class java.lang.ObjectKEKIdentifierpublic int getKeyIdType()
getKeyIdType in interface KeyIdentifierpublic java.lang.String getKeyIdTypeName()
getKeyIdTypeName in interface KeyIdentifierpublic java.lang.String toString()
toString in interface KeyIdentifiertoString 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 |
|