|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object iaik.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(ASN1Object obj)
Creates a KEKIdentifier from an ASN1Object. |
|
KEKIdentifier(byte[] keyIdentifier)
Creates a KEKIdentifier from the given keyIdentifier. |
Method Summary | |
---|---|
void |
decode(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. |
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 arraypublic KEKIdentifier(ASN1Object obj) throws CodingException
obj
- the KEKIdentifier as ASN1Object
CodingException
- if the ASN1Object cannot be decoded or
is invalid structuredMethod 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(ASN1Object obj) throws CodingException
decode
in interface ASN1Type
obj
- the KEKIdentifier as ASN1Object
CodingException
- if the ASN1Object cannot be decoded or
is invalid structuredpublic ASN1Object toASN1Object()
toASN1Object
in interface ASN1Type
public 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 KeyIdentifier
equals
in class java.lang.Object
obj
- 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 KeyIdentifier
hashCode
in class java.lang.Object
KEKIdentifier
public int getKeyIdType()
getKeyIdType
in interface KeyIdentifier
public java.lang.String getKeyIdTypeName()
getKeyIdTypeName
in interface KeyIdentifier
public java.lang.String toString()
toString
in interface KeyIdentifier
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 |