Class Pbkdf2PasswordHashProvider

java.lang.Object
org.keycloak.credential.hash.Pbkdf2PasswordHashProvider
All Implemented Interfaces:
org.keycloak.credential.hash.PasswordHashProvider, org.keycloak.provider.Provider

public class Pbkdf2PasswordHashProvider extends Object implements org.keycloak.credential.hash.PasswordHashProvider
Implementation PBKDF2 password hash algorithm.
Author:
Kunal Kerkar
  • Field Details

    • DEFAULT_DERIVED_KEY_SIZE

      public static final int DEFAULT_DERIVED_KEY_SIZE
      See Also:
  • Constructor Details

    • Pbkdf2PasswordHashProvider

      public Pbkdf2PasswordHashProvider(String providerId, String pbkdf2Algorithm, int defaultIterations, int minPbkdf2PasswordLengthForPadding)
    • Pbkdf2PasswordHashProvider

      public Pbkdf2PasswordHashProvider(String providerId, String pbkdf2Algorithm, int defaultIterations, int maxPaddingLength, int derivedKeySize)
  • Method Details

    • policyCheck

      public boolean policyCheck(org.keycloak.models.PasswordPolicy policy, org.keycloak.models.credential.PasswordCredentialModel credential)
      Specified by:
      policyCheck in interface org.keycloak.credential.hash.PasswordHashProvider
    • encodedCredential

      public org.keycloak.models.credential.PasswordCredentialModel encodedCredential(String rawPassword, int iterations)
      Specified by:
      encodedCredential in interface org.keycloak.credential.hash.PasswordHashProvider
    • encode

      public String encode(String rawPassword, int iterations)
      Specified by:
      encode in interface org.keycloak.credential.hash.PasswordHashProvider
    • verify

      public boolean verify(String rawPassword, org.keycloak.models.credential.PasswordCredentialModel credential)
      Specified by:
      verify in interface org.keycloak.credential.hash.PasswordHashProvider
    • close

      public void close()
      Specified by:
      close in interface org.keycloak.provider.Provider
    • getPbkdf2Algorithm

      public String getPbkdf2Algorithm()