Package com.netscape.certsrv.dbs.keydb
Class KeyId
java.lang.Object
com.netscape.certsrv.dbs.keydb.KeyId
- All Implemented Interfaces:
JSONSerializer
The KeyId class represents the identifier for a particular
key record. This identifier may be used to retrieve the key record
from the database.
- Version:
- $Revision$ $Date$
- Author:
- Endi S. Dewata
-
Field Summary
FieldsFields inherited from interface com.netscape.certsrv.util.JSONSerializer
logger
-
Constructor Summary
ConstructorsConstructorDescriptionKeyId
(byte[] bytes) Creates a new KeyId from its byte array representation.KeyId
(int id) Creates a new KeyId from its integer representation.Creates a new KeyId from its string representation.KeyId
(BigInteger id) Creates a new KeyId from its BigInteger representation. -
Method Summary
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.netscape.certsrv.util.JSONSerializer
toJSON
-
Field Details
-
value
protected byte[] value
-
-
Constructor Details
-
KeyId
Creates a new KeyId from its string representation.- Parameters:
id
- a string containing the decimal or hex value for the identifier.
-
KeyId
public KeyId(byte[] bytes) Creates a new KeyId from its byte array representation.- Parameters:
bytes
- a byte array containing the identifier.
-
KeyId
Creates a new KeyId from its BigInteger representation.- Parameters:
id
- a BigInteger containing the identifier.
-
KeyId
public KeyId(int id) Creates a new KeyId from its integer representation.- Parameters:
id
- an integer containing the identifier.
-
-
Method Details
-
toBigInteger
Converts the KeyId into its BigInteger representation.- Returns:
- a BigInteger containing the identifier.
-
toString
Converts the KeyId into its string representation. The string form can be stored in a database (such as the LDAP directory) -
toHexString
Converts the KeyId into its hex string representation. The string form can be stored in a database (such as the LDAP directory)- Returns:
- a string containing the hex (hex 16) value for the identifier.
-
toByteArray
public byte[] toByteArray()Converts the KeyId into its byte array representation.- Returns:
- a byte array containing the identifier.
-
hashCode
public int hashCode() -
equals
-