Package codes.grow.packages.vault
Class CreateKeyOptions.Builder
java.lang.Object
codes.grow.packages.vault.CreateKeyOptions.Builder
- Enclosing class:
CreateKeyOptions
Builder of
CreateKeyOptions.-
Method Summary
Modifier and TypeMethodDescriptionallowPlaintextBackup(boolean allow) Allows plaintext backups.autoRotatePeriod(Duration period) Sets the automatic rotation period.build()Builds the options.derived(boolean derived) Enables key derivation (requires a context on every call).exportable(boolean exportable) Allows key export.keySize(int keySize) Sets the key size (HMAC keys).Sets the key type.
-
Method Details
-
type
Sets the key type.- Parameters:
type- key type- Returns:
- this builder
-
exportable
Allows key export.- Parameters:
exportable- flag- Returns:
- this builder
-
derived
Enables key derivation (requires a context on every call).- Parameters:
derived- flag- Returns:
- this builder
-
autoRotatePeriod
Sets the automatic rotation period.- Parameters:
period- period (zero = off)- Returns:
- this builder
-
allowPlaintextBackup
Allows plaintext backups.- Parameters:
allow- flag- Returns:
- this builder
-
keySize
Sets the key size (HMAC keys).- Parameters:
keySize- bytes- Returns:
- this builder
-
build
Builds the options.- Returns:
- the options
-