Class PBKPD2HashProvider
java.lang.Object
ch.autumo.commons.security.password.PBKPD2HashProvider
- All Implemented Interfaces:
PasswordHashProvider
Provides a hash with PBKDF2 with HMAC and SHA256.
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
PBKPD2HashProvider
public PBKPD2HashProvider()PBKPD2 hash provider.
-
-
Method Details
-
hash
Description copied from interface:PasswordHashProviderCreate password hash.- Specified by:
hashin interfacePasswordHashProvider- Parameters:
password- password- Returns:
- hashed password
- Throws:
Exception- if hashing fails
-
verify
Description copied from interface:PasswordHashProviderVerify an entered password with a hashed password that has been previously hashed byPasswordHashProvider.hash(String).- Specified by:
verifyin interfacePasswordHashProvider- Parameters:
password- passwordhashedPassword- hashed password- Returns:
- true, if password matches hashed password
- Throws:
Exception- if verifying fails
-