Package overit.geocall.util.password
Class SCryptV2
java.lang.Object
overit.geocall.util.password.PasswordAlgo
overit.geocall.util.password.SCryptV2
Class that manages the SCrypt algorithm used to store the password.
This implementation follow the guidelines of ACN (Agenzia per la Cybersicurezza Nazionale) that states to use
SCrypt as algorithm with 8MiB of memory, 8 of block size and 10 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
-
SCryptV2
public SCryptV2()
-
-
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
-