From 047432559933543c058e5dd40250dbcd47d06c67 Mon Sep 17 00:00:00 2001
From: neil_a_wilson <neil_a_wilson@localhost>
Date: Sat, 07 Oct 2006 19:57:47 +0000
Subject: [PATCH] Add a new ByteStringFactory class that can be used to create ByteString objects without needing to reference any classes outside of the public API.  Also, update several classes that should use the public API to use the ByteStringFactory rather than creating ASN1OctetString objects.

---
 opendj-sdk/opends/src/server/org/opends/server/extensions/SaltedMD5PasswordStorageScheme.java |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/opendj-sdk/opends/src/server/org/opends/server/extensions/SaltedMD5PasswordStorageScheme.java b/opendj-sdk/opends/src/server/org/opends/server/extensions/SaltedMD5PasswordStorageScheme.java
index 873b592..9683992 100644
--- a/opendj-sdk/opends/src/server/org/opends/server/extensions/SaltedMD5PasswordStorageScheme.java
+++ b/opendj-sdk/opends/src/server/org/opends/server/extensions/SaltedMD5PasswordStorageScheme.java
@@ -37,8 +37,8 @@
 import org.opends.server.config.ConfigEntry;
 import org.opends.server.config.ConfigException;
 import org.opends.server.core.DirectoryServer;
-import org.opends.server.protocols.asn1.ASN1OctetString;
 import org.opends.server.types.ByteString;
+import org.opends.server.types.ByteStringFactory;
 import org.opends.server.types.DirectoryException;
 import org.opends.server.types.ErrorLogCategory;
 import org.opends.server.types.ErrorLogSeverity;
@@ -206,7 +206,7 @@
     System.arraycopy(saltBytes, 0, hashPlusSalt, digestBytes.length,
                      NUM_SALT_BYTES);
 
-    return new ASN1OctetString(Base64.encode(hashPlusSalt));
+    return ByteStringFactory.create(Base64.encode(hashPlusSalt));
   }
 
 
@@ -270,7 +270,7 @@
                      NUM_SALT_BYTES);
     buffer.append(Base64.encode(hashPlusSalt));
 
-    return new ASN1OctetString(buffer.toString());
+    return ByteStringFactory.create(buffer.toString());
   }
 
 
@@ -427,7 +427,7 @@
     authPWValue.append('$');
     authPWValue.append(Base64.encode(digestBytes));
 
-    return new ASN1OctetString(authPWValue.toString());
+    return ByteStringFactory.create(authPWValue.toString());
   }
 
 

--
Gitblit v1.10.0