mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

Jean-Noël Rouvignac
12.02.2016 cd384f445c1581cd3391e1414a9ec452afb22904
Sha2Crypt.java: Remove dependency to apache commons-codec by using StandardCharsets
1 files modified
5 ■■■■■ changed files
opendj-server-legacy/src/main/java/org/opends/server/extensions/Sha2Crypt.java 5 ●●●●● patch | view | raw | blame | history
opendj-server-legacy/src/main/java/org/opends/server/extensions/Sha2Crypt.java
@@ -30,6 +30,7 @@
 */
package org.opends.server.extensions;
import java.nio.charset.StandardCharsets;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
import java.util.Arrays;
@@ -37,8 +38,6 @@
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import org.apache.commons.codec.Charsets;
/**
 * SHA2-based Unix crypt implementation.
 * <p>
@@ -269,7 +268,7 @@
      roundsCustom = true;
    }
    final String saltString = m.group(4);
    final byte[] saltBytes = saltString.getBytes(Charsets.UTF_8);
    final byte[] saltBytes = saltString.getBytes(StandardCharsets.UTF_8);
    final int saltLen = saltBytes.length;
    // 1. start digest A