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

Jean-Noel Rouvignac
25.01.2014 65a6e3594c2a75f8dc18c1d10b15b464b0ddb613
opends/src/server/org/opends/server/extensions/PBKDF2PasswordStorageScheme.java
@@ -163,7 +163,7 @@
    System.arraycopy(saltBytes, 0, hashPlusSalt, digestBytes.length,
                     NUM_SALT_BYTES);
    return ByteString.valueOf(iterations + ':' + Base64.encode(hashPlusSalt));
    return ByteString.valueOf(iterations + ":" + Base64.encode(hashPlusSalt));
  }
  /** {@inheritDoc} */
@@ -186,6 +186,10 @@
    {
      String stored = storedPassword.toString();
      int pos = stored.indexOf(':');
      if (pos == -1)
      {
        throw new Exception();
      }
      final int iterations = Integer.parseInt(stored.substring(0, pos));
      byte[] decodedBytes = Base64.decode(stored.substring(pos + 1));
@@ -335,6 +339,10 @@
    try
    {
      int pos = authInfo.indexOf(':');
      if (pos == -1)
      {
        throw new Exception();
      }
      int iterations = Integer.parseInt(authInfo.substring(0, pos));
      byte[] saltBytes   = Base64.decode(authInfo.substring(pos + 1));
      byte[] digestBytes = Base64.decode(authValue);