summaryrefslogtreecommitdiffstats
path: root/base/common/src/com/netscape/certsrv
diff options
context:
space:
mode:
Diffstat (limited to 'base/common/src/com/netscape/certsrv')
-rw-r--r--base/common/src/com/netscape/certsrv/dbs/keydb/KeyId.java11
-rw-r--r--base/common/src/com/netscape/certsrv/request/RequestId.java11
2 files changed, 22 insertions, 0 deletions
diff --git a/base/common/src/com/netscape/certsrv/dbs/keydb/KeyId.java b/base/common/src/com/netscape/certsrv/dbs/keydb/KeyId.java
index f998bf97a..b8bb1870b 100644
--- a/base/common/src/com/netscape/certsrv/dbs/keydb/KeyId.java
+++ b/base/common/src/com/netscape/certsrv/dbs/keydb/KeyId.java
@@ -95,6 +95,17 @@ public class KeyId {
return value.toString();
}
+ /**
+ * Converts the KeyId into its hex string representation. The string
+ * form can be stored in a database (such as the LDAP directory)
+ *
+ * @return
+ * a string containing the hex (hex 16) value for the identifier.
+ */
+ public String toHexString() {
+ return "0x"+value.toString(16);
+ }
+
@Override
public int hashCode() {
final int prime = 31;
diff --git a/base/common/src/com/netscape/certsrv/request/RequestId.java b/base/common/src/com/netscape/certsrv/request/RequestId.java
index da61f2bc0..b643fa30d 100644
--- a/base/common/src/com/netscape/certsrv/request/RequestId.java
+++ b/base/common/src/com/netscape/certsrv/request/RequestId.java
@@ -94,6 +94,17 @@ public class RequestId {
return value.toString();
}
+ /**
+ * Converts the RequestId into its hex string representation. The string
+ * form can be stored in a database (such as the LDAP directory)
+ *
+ * @return
+ * a string containing the hex (base 16) value for the identifier.
+ */
+ public String toHexString() {
+ return "0x"+value.toString(16);
+ }
+
@Override
public int hashCode() {
final int prime = 31;