Class KeyConfig.Builder

java.lang.Object
codes.grow.packages.vault.KeyConfig.Builder
Enclosing class:
KeyConfig

public static final class KeyConfig.Builder extends Object
Builder of KeyConfig.
  • Method Details

    • deletionAllowed

      public KeyConfig.Builder deletionAllowed(boolean allowed)
      Allows deleteKey.
      Parameters:
      allowed - flag
      Returns:
      this builder
    • minDecryptionVersion

      public KeyConfig.Builder minDecryptionVersion(int version)
      Sets the minimum version allowed for decryption.
      Parameters:
      version - version
      Returns:
      this builder
    • minEncryptionVersion

      public KeyConfig.Builder minEncryptionVersion(int version)
      Sets the minimum version used for encryption (0 = latest).
      Parameters:
      version - version
      Returns:
      this builder
    • exportable

      public KeyConfig.Builder exportable(boolean exportable)
      Allows key export (cannot be undone).
      Parameters:
      exportable - flag
      Returns:
      this builder
    • allowPlaintextBackup

      public KeyConfig.Builder allowPlaintextBackup(boolean allow)
      Allows plaintext backups (cannot be undone).
      Parameters:
      allow - flag
      Returns:
      this builder
    • autoRotatePeriod

      public KeyConfig.Builder autoRotatePeriod(Duration period)
      Sets the automatic rotation period.
      Parameters:
      period - period (zero = off)
      Returns:
      this builder
    • build

      public KeyConfig build()
      Builds the settings.
      Returns:
      the settings