From e91a87afe532a9a3aa42189ca43cf5cd63ecf759 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.
---
opends/src/server/org/opends/server/extensions/SaltedSHA256PasswordStorageScheme.java | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/opends/src/server/org/opends/server/extensions/SaltedSHA256PasswordStorageScheme.java b/opends/src/server/org/opends/server/extensions/SaltedSHA256PasswordStorageScheme.java
index 492da2c..c6d4ce4 100644
--- a/opends/src/server/org/opends/server/extensions/SaltedSHA256PasswordStorageScheme.java
+++ b/opends/src/server/org/opends/server/extensions/SaltedSHA256PasswordStorageScheme.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;
@@ -208,7 +208,7 @@
System.arraycopy(saltBytes, 0, hashPlusSalt, digestBytes.length,
NUM_SALT_BYTES);
- return new ASN1OctetString(Base64.encode(hashPlusSalt));
+ return ByteStringFactory.create(Base64.encode(hashPlusSalt));
}
@@ -272,7 +272,7 @@
NUM_SALT_BYTES);
buffer.append(Base64.encode(hashPlusSalt));
- return new ASN1OctetString(buffer.toString());
+ return ByteStringFactory.create(buffer.toString());
}
@@ -429,7 +429,7 @@
authPWValue.append('$');
authPWValue.append(Base64.encode(digestBytes));
- return new ASN1OctetString(authPWValue.toString());
+ return ByteStringFactory.create(authPWValue.toString());
}
--
Gitblit v1.10.0