Class PasswordPepperKey
java.lang.Object
com.revetsec.password.PasswordPepperKey
An application-owned, 32-byte Argon2id secret-input key identified by a non-secret ID. Keep the
key outside the password-hash database. The supplied array is copied and remains caller-owned.
- Since:
- 1.0.0
-
Method Summary
Modifier and TypeMethodDescriptionstatic @NonNull PasswordPepperKeyConstructs a pepper key from 32 cryptographically random bytes.getKeyId()Returns the identifier used to select this pepper key.toString()
-
Method Details
-
fromBytes
public static @NonNull PasswordPepperKey fromBytes(@NonNull String keyId, byte @NonNull [] keyBytes) Constructs a pepper key from 32 cryptographically random bytes.- Parameters:
keyId- stable 1–64 character ASCII key IDkeyBytes- 32 secret bytes; borrowed only for this call and not modified- Returns:
- a retained defensive copy
- Since:
- 1.0.0
-
getKeyId
-
toString
-