Module io.inverno.mod.security
Enum Class Argon2Password.Encoder.HashType
java.lang.Object
java.lang.Enum<Argon2Password.Encoder.HashType>
io.inverno.mod.security.authentication.password.Argon2Password.Encoder.HashType
- All Implemented Interfaces:
Serializable
,Comparable<Argon2Password.Encoder.HashType>
,Constable
- Enclosing class:
Argon2Password.Encoder
The type of hash.
- Since:
- 1.5
- Author:
- Jeremy Kuhn
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
-
Method Summary
Modifier and TypeMethodDescriptionfromId
(int id) Returns the hash type corresponding to the specified id.Returns the hash type corresponding to the specified name.int
getId()
Returns the hash type id.getName()
Returns the hash type name.Returns the enum constant of this class with the specified name.static Argon2Password.Encoder.HashType[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
D
Argon2d maximizes resistance to GPU cracking attacks. -
I
Argon2i is optimized to resist side-channel attacks. -
ID
Argon2id is a hybrid version that follows the Argon2i approach for the first half pass over memory and the Argon2d approach for subsequent passes.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is null
-
getId
public int getId()Returns the hash type id.
- Returns:
- the hash type id
-
getName
Returns the hash type name.
- Returns:
- the name
-
fromId
Returns the hash type corresponding to the specified id.
- Parameters:
id
- an hash type id- Returns:
- an hash type
- Throws:
IllegalArgumentException
- if the specified id is not supported
-
fromName
Returns the hash type corresponding to the specified name.
- Parameters:
name
- an hash type name- Returns:
- an hash type
- Throws:
IllegalArgumentException
- if the specified name is not supported
-