From 88db774678ad897f57338a3e1b34a1431ccdd5fd Mon Sep 17 00:00:00 2001
From: neil_a_wilson <neil_a_wilson@localhost>
Date: Mon, 26 Feb 2007 20:40:46 +0000
Subject: [PATCH] Add three new certificate mappers to the server:
---
opends/src/server/org/opends/server/util/StaticUtils.java | 31 +++++++++++++++++++++++++++++++
1 files changed, 31 insertions(+), 0 deletions(-)
diff --git a/opends/src/server/org/opends/server/util/StaticUtils.java b/opends/src/server/org/opends/server/util/StaticUtils.java
index a0b29d2..ace21e6 100644
--- a/opends/src/server/org/opends/server/util/StaticUtils.java
+++ b/opends/src/server/org/opends/server/util/StaticUtils.java
@@ -759,6 +759,37 @@
/**
* Retrieves a string representation of the contents of the provided byte
+ * array using hexadecimal characters and a colon between each byte.
+ *
+ * @param b The byte array containing the data.
+ *
+ * @return A string representation of the contents of the provided byte
+ * array using hexadecimal characters.
+ */
+ public static String bytesToColonDelimitedHex(byte[] b)
+ {
+ if ((b == null) || (b.length == 0))
+ {
+ return "";
+ }
+
+ int arrayLength = b.length;
+ StringBuilder buffer = new StringBuilder((arrayLength - 1) * 3 + 2);
+ buffer.append(byteToHex(b[0]));
+
+ for (int i=1; i < arrayLength; i++)
+ {
+ buffer.append(":");
+ buffer.append(byteToHex(b[i]));
+ }
+
+ return buffer.toString();
+ }
+
+
+
+ /**
+ * Retrieves a string representation of the contents of the provided byte
* buffer using hexadecimal characters and a space between each byte.
*
* @param b The byte buffer containing the data.
--
Gitblit v1.10.0