Package org.keycloak.credential.hash
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 Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionPbkdf2PasswordHashProvider(String providerId, String pbkdf2Algorithm, int defaultIterations, int minPbkdf2PasswordLengthForPadding) Pbkdf2PasswordHashProvider(String providerId, String pbkdf2Algorithm, int defaultIterations, int maxPaddingLength, int derivedKeySize) -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()org.keycloak.models.credential.PasswordCredentialModelencodedCredential(String rawPassword, int iterations) booleanpolicyCheck(org.keycloak.models.PasswordPolicy policy, org.keycloak.models.credential.PasswordCredentialModel credential) booleanMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.keycloak.credential.hash.PasswordHashProvider
credentialHashingStrength, encode, policyCheck, verify
-
Field Details
-
DEFAULT_DERIVED_KEY_SIZE
public static final int DEFAULT_DERIVED_KEY_SIZE- See Also:
-
-
Constructor Details
-
Pbkdf2PasswordHashProvider
-
Pbkdf2PasswordHashProvider
-
-
Method Details
-
policyCheck
public boolean policyCheck(org.keycloak.models.PasswordPolicy policy, org.keycloak.models.credential.PasswordCredentialModel credential) - Specified by:
policyCheckin interfaceorg.keycloak.credential.hash.PasswordHashProvider
-
encodedCredential
public org.keycloak.models.credential.PasswordCredentialModel encodedCredential(String rawPassword, int iterations) - Specified by:
encodedCredentialin interfaceorg.keycloak.credential.hash.PasswordHashProvider
-
encode
- Specified by:
encodein interfaceorg.keycloak.credential.hash.PasswordHashProvider
-
verify
public boolean verify(String rawPassword, org.keycloak.models.credential.PasswordCredentialModel credential) - Specified by:
verifyin interfaceorg.keycloak.credential.hash.PasswordHashProvider
-
close
public void close()- Specified by:
closein interfaceorg.keycloak.provider.Provider
-
getPbkdf2Algorithm
-