Package codes.grow.packages.vault
Class KeyConfig.Builder
java.lang.Object
codes.grow.packages.vault.KeyConfig.Builder
- Enclosing class:
KeyConfig
Builder of
KeyConfig.-
Method Summary
Modifier and TypeMethodDescriptionallowPlaintextBackup(boolean allow) Allows plaintext backups (cannot be undone).autoRotatePeriod(Duration period) Sets the automatic rotation period.build()Builds the settings.deletionAllowed(boolean allowed) AllowsdeleteKey.exportable(boolean exportable) Allows key export (cannot be undone).minDecryptionVersion(int version) Sets the minimum version allowed for decryption.minEncryptionVersion(int version) Sets the minimum version used for encryption (0 = latest).
-
Method Details
-
deletionAllowed
AllowsdeleteKey.- Parameters:
allowed- flag- Returns:
- this builder
-
minDecryptionVersion
Sets the minimum version allowed for decryption.- Parameters:
version- version- Returns:
- this builder
-
minEncryptionVersion
Sets the minimum version used for encryption (0 = latest).- Parameters:
version- version- Returns:
- this builder
-
exportable
Allows key export (cannot be undone).- Parameters:
exportable- flag- Returns:
- this builder
-
allowPlaintextBackup
Allows plaintext backups (cannot be undone).- Parameters:
allow- flag- Returns:
- this builder
-
autoRotatePeriod
Sets the automatic rotation period.- Parameters:
period- period (zero = off)- Returns:
- this builder
-
build
Builds the settings.- Returns:
- the settings
-