Package overit.geocall.util.password
Class PasswordAlgo
java.lang.Object
overit.geocall.util.password.PasswordAlgo
Abstract class used to manage the algorithm to store a password
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract booleanChecks if the stored hashed password correspondsabstract StringGenerates the hashed passwordstatic PasswordAlgogetInstance(PasswordAlgo.Type algo) Static method used to return an instance of a algorithmabstract PasswordAlgo.TypegetType()Returns the type of algorithm used
-
Field Details
-
ARGON2_BETA
- See Also:
-
BCRYPT
- See Also:
-
SCRYPT
- See Also:
-
OPKBDF2
- See Also:
-
-
Constructor Details
-
PasswordAlgo
public PasswordAlgo()
-
-
Method Details
-
getInstance
Static method used to return an instance of a algorithm- Parameters:
algo- The type of algorithm- Returns:
- An instance of the algorithm
-
check
Checks if the stored hashed password corresponds- Parameters:
password- The password to checkstored- The stored password to check- Returns:
trueif the password corresponds to the stored one,falseotherwise
-
generate
Generates the hashed password- Parameters:
password- To hash- Returns:
- The hashed password
-
getType
Returns the type of algorithm used- Returns:
- The type of algorithm used
-