Class PasswordPepperSnapshot.Builder
java.lang.Object
com.revetsec.password.PasswordPepperSnapshot.Builder
- Enclosing class:
PasswordPepperSnapshot
@NotThreadSafe
@CheckReturnValue
public static final class PasswordPepperSnapshot.Builder
extends Object
Snapshot construction; keys are never exposed by iteration.
- Since:
- 1.0.0
-
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds a coherent snapshot of the active and retained keys.retainedKeys(@Nullable List<@NonNull PasswordPepperKey> retainedKeys) Replaces the complete set of prior verification-only keys.
-
Method Details
-
retainedKeys
public @NonNull PasswordPepperSnapshot.Builder retainedKeys(@Nullable List<@NonNull PasswordPepperKey> retainedKeys) Replaces the complete set of prior verification-only keys. The input is copied before assignment; invalid lists leave the previous builder state unchanged.- Parameters:
retainedKeys- at most 15 keys with distinct IDs, or null to retain none- Returns:
- this builder
- Since:
- 1.0.0
-
build
Builds a coherent snapshot of the active and retained keys.- Returns:
- immutable snapshot
- Since:
- 1.0.0
-