iaik.cms
Interface KeyIdentifier

All Superinterfaces:
ASN1Type
All Known Subinterfaces:
CertificateIdentifier
All Known Implementing Classes:
EntityIdentifier, IssuerAndSerialNumber, KEKIdentifier, OriginatorPublicKey, RecipientKeyIdentifier, SignerIdentifier, SubjectKeyID

public interface KeyIdentifier
extends ASN1Type

Interface to be implemented by any CMS type that is used for identifying a key.


Field Summary
static int ISSUER_AND_SERIALNUMBER
          The CMS key (certificate) identifier type IssuerAndSerialNumber.
static int KEK_IDENTIFIER
          The CMS key identifier type KEKIdentifier.
static int ORIGINATOR_PUBLIC_KEY
          The CMS key identifier type OriginatorPublicKey.
static int RECIPIENT_KEY_IDENTIFIER
          The CMS key (certificate) identifier type RecipientKeyIdentifier The RecipientKeyIdentifier type is used for identifying a recipient in a KeyAgreeRecipientInfo.
static int SUBJECT_KEY_IDENTIFIER
          The CMS key (certificate) identifier type SubjectKeyIdentifier.
 
Method Summary
 boolean equals(java.lang.Object other)
          Compares this KeyIdentifier to the specified object.
 int getKeyIdType()
          Returns the type of the key identifier.
 java.lang.String getKeyIdTypeName()
          Returns the type of the key identifier as string.
 int hashCode()
          Returns a hashcode for this KeyIdentifier.
 java.lang.String toString()
          Returns a string giving some information about this KeyIdentifier object.
 
Methods inherited from interface iaik.asn1.ASN1Type
decode, toASN1Object
 

Field Detail

ISSUER_AND_SERIALNUMBER

static final int ISSUER_AND_SERIALNUMBER
The CMS key (certificate) identifier type IssuerAndSerialNumber.

The IssuerAndSerialNumber type may be used for identifying a signer in a SignerInfo, a recipient in a KeyTransRecipientInfo or KeyAgreeRecipientInfo, or the originator in a KeyAgreeRecipientInfo.

See Also:
Constant Field Values

SUBJECT_KEY_IDENTIFIER

static final int SUBJECT_KEY_IDENTIFIER
The CMS key (certificate) identifier type SubjectKeyIdentifier.

The SubjectKeyIdentifier type may be used for identifying a signer in a SignerInfo, a recipient in a KeyTransRecipientInfo, or the originator in a KeyAgreeRecipientInfo.

See Also:
Constant Field Values

RECIPIENT_KEY_IDENTIFIER

static final int RECIPIENT_KEY_IDENTIFIER
The CMS key (certificate) identifier type RecipientKeyIdentifier

The RecipientKeyIdentifier type is used for identifying a recipient in a KeyAgreeRecipientInfo.

See Also:
Constant Field Values

KEK_IDENTIFIER

static final int KEK_IDENTIFIER
The CMS key identifier type KEKIdentifier.

The KEKIdentifier type is used for identifying a recipient in a KEKRecipientInfo.

See Also:
Constant Field Values

ORIGINATOR_PUBLIC_KEY

static final int ORIGINATOR_PUBLIC_KEY
The CMS key identifier type OriginatorPublicKey.

The OriginatorPublicKey type may be used for identifying the originator in a KeyAgreeRecipientInfo.

See Also:
Constant Field Values
Method Detail

getKeyIdType

int getKeyIdType()
Returns the type of the key identifier.

Returns:
ISSUER_AND_SERIALNUMBER (0) or SUBJECT_KEY_IDENTIFIER (1) or RECIPIENT_KEY_IDENTIFIER (2) or KEK_IDENTIFIER (3) or ORIGINATOR_PUBLIC_KEY (4)

getKeyIdTypeName

java.lang.String getKeyIdTypeName()
Returns the type of the key identifier as string.

Returns:
"IssuerAndSerialNumber" (0) or "SubjectKeyIdentifier" (1) or "RecipientKeyIdentifier" (2) or "KEKIdentifier" (3) "OriginatorPublicKey" (4)

equals

boolean equals(java.lang.Object other)
Compares this KeyIdentifier to the specified object.

Overrides:
equals in class java.lang.Object
Parameters:
other - the object to compare this KeyIdentifier against.
Returns:
true, if the given object is equal to this KeyIdentifier, false otherwise

hashCode

int hashCode()
Returns a hashcode for this KeyIdentifier.

Overrides:
hashCode in class java.lang.Object
Returns:
a hashcode for this KeyIdentifier

toString

java.lang.String toString()
Returns a string giving some information about this KeyIdentifier object.

Overrides:
toString in class java.lang.Object
Returns:
the string representation

This Javadoc may contain text parts from text parts from IETF Internet Standard specifications (see copyright note).

IAIK-CMS 6.0, (c) 2002 IAIK, (c) 2003, 2023 SIC