Class CreateKeyOptions.Builder

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

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

    • type

      public CreateKeyOptions.Builder type(String type)
      Sets the key type.
      Parameters:
      type - key type
      Returns:
      this builder
    • exportable

      public CreateKeyOptions.Builder exportable(boolean exportable)
      Allows key export.
      Parameters:
      exportable - flag
      Returns:
      this builder
    • derived

      public CreateKeyOptions.Builder derived(boolean derived)
      Enables key derivation (requires a context on every call).
      Parameters:
      derived - flag
      Returns:
      this builder
    • autoRotatePeriod

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

      public CreateKeyOptions.Builder allowPlaintextBackup(boolean allow)
      Allows plaintext backups.
      Parameters:
      allow - flag
      Returns:
      this builder
    • keySize

      public CreateKeyOptions.Builder keySize(int keySize)
      Sets the key size (HMAC keys).
      Parameters:
      keySize - bytes
      Returns:
      this builder
    • build

      public CreateKeyOptions build()
      Builds the options.
      Returns:
      the options