Class Argon2idParameters
java.lang.Object
com.revetsec.password.Argon2idParameters
Argon2id version 19 parameters for newly created password hashes.
- Since:
- 1.0.0
-
Method Summary
Modifier and TypeMethodDescriptionstatic @NonNull Argon2idParametersSelects the total memory, passes, and lanes.getLanes()Returns the parallelism setting.Returns the total memory cost.Returns the time cost.toString()
-
Method Details
-
fromCosts
public static @NonNull Argon2idParameters fromCosts(@NonNull Integer memoryKiB, @NonNull Integer passes, @NonNull Integer lanes) Selects the total memory, passes, and lanes. New hashes require at least 19 MiB and two passes, or at least 46 MiB for a single pass. The upper bounds protect the Java process.- Parameters:
memoryKiB- total memory in KiBpasses- number of passeslanes- degree of parallelism (Argon2 lanes, not library worker threads)- Returns:
- validated parameters
- Since:
- 1.0.0
-
getMemoryKiB
Returns the total memory cost.- Returns:
- total memory in KiB
- Since:
- 1.0.0
-
getPasses
-
getLanes
-
toString
-