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

Jean-Noël Rouvignac
20.42.2016 61b9eb1be03fc03a9f4bb0013a08ff44a1059503
opendj-server-legacy/src/main/java/org/opends/server/extensions/AESPasswordStorageScheme.java
@@ -16,8 +16,6 @@
 */
package org.opends.server.extensions;
import org.forgerock.i18n.LocalizableMessage;
import org.forgerock.opendj.server.config.server.AESPasswordStorageSchemeCfg;
import org.opends.server.api.PasswordStorageScheme;
@@ -36,8 +34,6 @@
import static org.opends.server.extensions.ExtensionsConstants.*;
import static org.opends.server.util.StaticUtils.*;
/**
 * This class defines a Directory Server password storage scheme that will
 * encode values using the AES reversible encryption algorithm.  This
@@ -49,16 +45,12 @@
{
  private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass();
  /**
   * The reference to the Directory Server crypto manager that we will use to
   * handle the encryption/decryption.
   */
  private CryptoManager cryptoManager;
  /**
   * Creates a new instance of this password storage scheme.  Note that no
   * initialization should be performed here, as all initialization should be
@@ -69,7 +61,6 @@
    super();
  }
  /** {@inheritDoc} */
  @Override
  public void initializePasswordStorageScheme(
                   AESPasswordStorageSchemeCfg configuration)
@@ -78,14 +69,12 @@
    cryptoManager = DirectoryServer.getCryptoManager();
  }
  /** {@inheritDoc} */
  @Override
  public String getStorageSchemeName()
  {
    return STORAGE_SCHEME_NAME_AES;
  }
  /** {@inheritDoc} */
  @Override
  public ByteString encodePassword(ByteSequence plaintext)
         throws DirectoryException
@@ -118,7 +107,6 @@
    }
  }
  /** {@inheritDoc} */
  @Override
  public ByteString encodePasswordWithScheme(ByteSequence plaintext)
         throws DirectoryException
@@ -157,7 +145,6 @@
    return ByteString.valueOfUtf8(buffer);
  }
  /** {@inheritDoc} */
  @Override
  public boolean passwordMatches(ByteSequence plaintextPassword,
                                 ByteSequence storedPassword)
@@ -177,14 +164,12 @@
    }
  }
  /** {@inheritDoc} */
  @Override
  public boolean isReversible()
  {
    return true;
  }
  /** {@inheritDoc} */
  @Override
  public ByteString getPlaintextValue(ByteSequence storedPassword)
         throws DirectoryException
@@ -206,7 +191,6 @@
    }
  }
  /** {@inheritDoc} */
  @Override
  public boolean supportsAuthPasswordSyntax()
  {
@@ -214,7 +198,6 @@
    return false;
  }
  /** {@inheritDoc} */
  @Override
  public ByteString encodeAuthPassword(ByteSequence plaintext)
         throws DirectoryException
@@ -224,7 +207,6 @@
    throw new DirectoryException(ResultCode.UNWILLING_TO_PERFORM, message);
  }
  /** {@inheritDoc} */
  @Override
  public boolean authPasswordMatches(ByteSequence plaintextPassword,
                                     String authInfo, String authValue)
@@ -233,7 +215,6 @@
    return false;
  }
  /** {@inheritDoc} */
  @Override
  public ByteString getAuthPasswordPlaintextValue(String authInfo,
                                                  String authValue)
@@ -244,7 +225,6 @@
    throw new DirectoryException(ResultCode.UNWILLING_TO_PERFORM, message);
  }
  /** {@inheritDoc} */
  @Override
  public boolean isStorageSchemeSecure()
  {
@@ -252,4 +232,3 @@
    return true;
  }
}