From dde03e77e46c7717d502b7c4fd596d78c6ec92ba Mon Sep 17 00:00:00 2001
From: Luca Leonardo Scorcia <l.scorcia@gmail.com>
Date: Wed, 11 May 2022 09:31:11 +0000
Subject: [PATCH] Implement PBKDF2-HMAC-SHA256 and PBKDF-HMAC-SHA512 password encoding schemes (#227) (#228)

---
 opendj-server-legacy/src/main/java/org/opends/server/extensions/ExtensionsConstants.java |   34 ++++++++++++++++++++++++++++++++++
 1 files changed, 34 insertions(+), 0 deletions(-)

diff --git a/opendj-server-legacy/src/main/java/org/opends/server/extensions/ExtensionsConstants.java b/opendj-server-legacy/src/main/java/org/opends/server/extensions/ExtensionsConstants.java
index ac6ad90..43b7092 100644
--- a/opendj-server-legacy/src/main/java/org/opends/server/extensions/ExtensionsConstants.java
+++ b/opendj-server-legacy/src/main/java/org/opends/server/extensions/ExtensionsConstants.java
@@ -73,6 +73,17 @@
    */
   public static final String AUTH_PASSWORD_SCHEME_NAME_PBKDF2 = "PBKDF2";
 
+  /**
+   * The authentication password scheme name for use with passwords encoded in a
+   * PBKDF2 representation.
+   */
+  public static final String AUTH_PASSWORD_SCHEME_NAME_PBKDF2_HMAC_SHA256 = "PBKDF2-HMAC-SHA256";
+
+  /**
+   * The authentication password scheme name for use with passwords encoded in a
+   * PBKDF2 representation.
+   */
+  public static final String AUTH_PASSWORD_SCHEME_NAME_PBKDF2_HMAC_SHA512 = "PBKDF2-HMAC-SHA512";
 
   /**
    * The authentication password scheme name for use with passwords encoded in a
@@ -128,7 +139,19 @@
   public static final String MESSAGE_DIGEST_ALGORITHM_PBKDF2 =
        "PBKDF2WithHmacSHA1";
 
+  /**
+   * The name of the message digest algorithm that should be used to generate
+   * PBKDF2 hashes.
+   */
+  public static final String MESSAGE_DIGEST_ALGORITHM_PBKDF2_HMAC_SHA256 =
+          "PBKDF2WithHmacSHA256";
 
+  /**
+   * The name of the message digest algorithm that should be used to generate
+   * PBKDF2 hashes.
+   */
+  public static final String MESSAGE_DIGEST_ALGORITHM_PBKDF2_HMAC_SHA512 =
+          "PBKDF2WithHmacSHA512";
 
   /**
    * The name of the pseudo-random number generator using SHA-1.
@@ -328,6 +351,17 @@
    */
   public static final String STORAGE_SCHEME_NAME_PBKDF2 = "PBKDF2";
 
+  /**
+   * The password storage scheme name that will be used for passwords stored in
+   * a PBKDF2 representation.
+   */
+  public static final String STORAGE_SCHEME_NAME_PBKDF2_HMAC_SHA256 = "PBKDF2-HMAC-SHA256";
+
+  /**
+   * The password storage scheme name that will be used for passwords stored in
+   * a PBKDF2 representation.
+   */
+  public static final String STORAGE_SCHEME_NAME_PBKDF2_HMAC_SHA512 = "PBKDF2-HMAC-SHA512";
 
   /**
    * The password storage scheme name that will be used for passwords stored in

--
Gitblit v1.10.0