Class Argon2HashProvider
java.lang.Object
ch.autumo.commons.security.password.Argon2HashProvider
- All Implemented Interfaces:
PasswordHashProvider
Provides a hash with Argon2id.
-
Constructor Summary
-
Method Summary
-
Constructor Details
-
Argon2HashProvider
public Argon2HashProvider()Argon hash provider.
-
-
Method Details
-
hash
Description copied from interface:PasswordHashProvider
Create password hash.- Specified by:
hash
in interfacePasswordHashProvider
- Parameters:
password
- password- Returns:
- hashed password
- Throws:
Exception
- if hashing fails
-
verify
Description copied from interface:PasswordHashProvider
Verify an entered password with a hashed password that has been previously hashed byPasswordHashProvider.hash(String)
.- Specified by:
verify
in interfacePasswordHashProvider
- Parameters:
password
- passwordhashedPassword
- hashed password- Returns:
- true, if password matches hashed password
- Throws:
Exception
- if verifying fails
-