Package overit.geocall.util.password
Class Argon2V2
java.lang.Object
overit.geocall.util.password.PasswordAlgo
overit.geocall.util.password.Argon2V2
Class that manages the Argon2 algorithm used to store the password.
This implementation follow the guidelines of ACN (Agenzia per la Cybersicurezza Nazionale) that states to use
Argon2id as algorithm with 7MiB of memory, 5 iterations and 1 as parallelism.
-
Nested Class Summary
Nested classes/interfaces inherited from class overit.geocall.util.password.PasswordAlgo
PasswordAlgo.Type -
Field Summary
Fields inherited from class overit.geocall.util.password.PasswordAlgo
ARGON2_BETA, BCRYPT, OPKBDF2, SCRYPT -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class overit.geocall.util.password.PasswordAlgo
getInstance
-
Constructor Details
-
Argon2V2
public Argon2V2()
-
-
Method Details
-
generate
Description copied from class:PasswordAlgoGenerates the hashed password- Specified by:
generatein classPasswordAlgo- Parameters:
password- To hash- Returns:
- The hashed password
-
check
Description copied from class:PasswordAlgoChecks if the stored hashed password corresponds- Specified by:
checkin classPasswordAlgo- Parameters:
password- The password to checkstored- The stored password to check- Returns:
trueif the password corresponds to the stored one,falseotherwise
-
getType
Description copied from class:PasswordAlgoReturns the type of algorithm used- Specified by:
getTypein classPasswordAlgo- Returns:
- The type of algorithm used
-