com.rsa.certj.cert.attributes

Class LocalKeyID

java.lang.Object
  |
  +--com.rsa.certj.cert.attributes.X501Attribute
        |
        +--com.rsa.certj.cert.attributes.LocalKeyID
All Implemented Interfaces:
Cloneable, Serializable

public class LocalKeyID
extends X501Attribute
implements Cloneable, Serializable

This class holds, encodes, and decodes the local key ID attribute, which is defined in PKCS #9 v2. The local key identifier attribute carries an identifier for a particular key. This attribute can assign identifiers to keys; however, it should be used only in local applications.

The PKCS #12 v1.0 definition is as follows:

 
 localKeyId ATTRIBUTE ::= {
        WITH SYNTAX OCTET STRING
        EQUALITY MATCHING RULE octetStringMatch
        SINGLE VALUE TRUE
        ID pkcs-9-at-localKeyId
 }
 pkcs-9                 OBJECT IDENTIFIER ::= {iso(1) member-body(2) us(840)
                        rsadsi(113549) pkcs(1) 9}
 pkcs-9-at-localKeyId   OBJECT IDENTIFIER ::= {pkcs-9 21}
As indicated, localKeyId attributes must have a single value. For two localKeyId values to match, their octet-string representation must be of equal length and their corresponding octets must be identical.

Copyright © RSA Security Inc., 1999-2001. All rights reserved.

See Also

Serialized Form

Fields inherited from class com.rsa.certj.cert.attributes.X501Attribute
CHALLENGE_PASSWORD, CONTENT_TYPE, COUNTRY_OF_CITIZENSHIP, COUNTRY_OF_RESIDENCE, CRS_DUAL_STATUS, CRS_FAILURE_INFO, CRS_MESSAGE_TYPE, CRS_PKI_STATUS, CRS_RECIPIENT_NONCE, CRS_SENDER_NONCE, CRS_TRANSACTION_ID, CRS_VERSION, DATE_OF_BIRTH, FRIENDLY_NAME, GENDER, LOCAL_KEY_ID, MESSAGE_DIGEST, NON_STANDARD, PLACE_OF_BIRTH, POSTAL_ADDRESS, PSEUDONYM, SIGNING_TIME, SMART_CSP, X509_V3_EXTENSION
 

Constructor Summary

LocalKeyID()

Creates an empty LocalKeyID object.

LocalKeyID(byte[] keyID, int offset, int len)

Constructs a LocalKeyID object and initializes it with the values given.

 

Method Summary

 Object

clone()

Overrides the default clone method to get a deeper clone.

 boolean

equals(Object obj)

Returns true if this object and obj contain the same LocalKeyID, returns false otherwise.

 byte[]

getLocalKeyID()

Gets the value of this attribute, the local key ID.

 void

setLocalKeyID(byte[] keyID, int offset, int len)

Sets the value of this attribute, the local key ID, to keyID.

 
Methods inherited from class com.rsa.certj.cert.attributes.X501Attribute
clearSensitiveData, compareOID, derEncodeAttributeLen, getAttributeType, getAttributeTypeString, getDEREncoding, getDERLen, getInstance, getNextBEROffset, getOID, isAttributeType
 
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LocalKeyID

public LocalKeyID()
Creates an empty LocalKeyID object.

LocalKeyID

public LocalKeyID(byte[] keyID,
                  int offset,
                  int len)
Constructs a LocalKeyID object and initializes it with the values given.

Parameters

         keyID  

The local key ID.

         offset  

The offset into the keyID array.

         len  

The length of the keyID array.

Method Detail

getLocalKeyID

public byte[] getLocalKeyID()
Gets the value of this attribute, the local key ID.

Returns

A new instance of the byte array.

setLocalKeyID

public void setLocalKeyID(byte[] keyID,
                          int offset,
                          int len)
Sets the value of this attribute, the local key ID, to keyID.

Parameters

         keyID  

A byte array that contains the key ID.

         offset  

The offset into the keyID array.

         len  

The length of the local key ID in the keyID array.


clone

public Object clone()
             throws CloneNotSupportedException
Overrides the default clone method to get a deeper clone.

Overrides

clone in class X501Attribute

Returns

A new LocalKeyID object, a copy of this object.

Throws

CloneNotSupportedException - If the cloning operation is not successful.

equals

public boolean equals(Object obj)
Returns true if this object and obj contain the same LocalKeyID, returns false otherwise.

Overrides

equals in class Object

Parameters

         obj  

The instance of the LocalKeyID object.

Returns

A boolean indicating whether these objects are equal.


RSA BSAFE ® Cert-J 2.1.1 001-047007-211-001-000