Class PasswordVerificationLimits.Builder
java.lang.Object
com.revetsec.password.PasswordVerificationLimits.Builder
- Enclosing class:
PasswordVerificationLimits
@NotThreadSafe
@CheckReturnValue
public static final class PasswordVerificationLimits.Builder
extends Object
Mutable construction helper; no cryptographic or provider work runs during construction.
- Since:
- 1.0.0
-
Method Summary
Modifier and TypeMethodDescriptionbuild()Validates the ceilings without performing I/O or allocating KDF memory.maximumArgon2idLanes(@Nullable Integer value) Sets the maximum accepted Argon2id parallelism.Sets the maximum accepted Argon2id memory cost.Sets the maximum accepted Argon2id time cost.maximumPasswordChars(@Nullable Integer value) Sets the input length limit before normalization.Sets the password byte length limit after normalization.Sets the stored-form length limit.
-
Method Details
-
maximumStoredFormChars
Sets the stored-form length limit.- Parameters:
value- maximum stored-form characters, or null to restore the default- Returns:
- this builder
- Since:
- 1.0.0
-
maximumPasswordChars
Sets the input length limit before normalization.- Parameters:
value- maximum input UTF-16 code units, or null to restore the default- Returns:
- this builder
- Since:
- 1.0.0
-
maximumPasswordUtf8Bytes
public @NonNull PasswordVerificationLimits.Builder maximumPasswordUtf8Bytes(@Nullable Integer value) Sets the password byte length limit after normalization.- Parameters:
value- maximum normalized UTF-8 bytes, or null to restore the default- Returns:
- this builder
- Since:
- 1.0.0
-
maximumArgon2idMemoryKiB
public @NonNull PasswordVerificationLimits.Builder maximumArgon2idMemoryKiB(@Nullable Integer value) Sets the maximum accepted Argon2id memory cost.- Parameters:
value- maximum Argon2id verification memory in KiB, or null to restore the default- Returns:
- this builder
- Since:
- 1.0.0
-
maximumArgon2idPasses
Sets the maximum accepted Argon2id time cost.- Parameters:
value- maximum Argon2id verification passes, or null to restore the default- Returns:
- this builder
- Since:
- 1.0.0
-
maximumArgon2idLanes
Sets the maximum accepted Argon2id parallelism.- Parameters:
value- maximum Argon2id verification lanes, or null to restore the default- Returns:
- this builder
- Since:
- 1.0.0
-
build
Validates the ceilings without performing I/O or allocating KDF memory.- Returns:
- immutable limits
- Since:
- 1.0.0
-