Class VaultSignRequest.VaultSignRequestBuilder

java.lang.Object
org.springframework.vault.support.VaultSignRequest.VaultSignRequestBuilder
Enclosing class:
VaultSignRequest

public static class VaultSignRequest.VaultSignRequestBuilder extends Object
Builder to build a VaultSignRequest.
  • Constructor Details

    • VaultSignRequestBuilder

      public VaultSignRequestBuilder()
  • Method Details

    • plaintext

      Configure the input to be used to create the signature.
      Parameters:
      input - base input to create the signature, must not be null.
      Returns:
      this builder.
    • hashAlgorithm

      public VaultSignRequest.VaultSignRequestBuilder hashAlgorithm(String hashAlgorithm)
      Configure the hash algorithm to be used for the operation.
      Parameters:
      hashAlgorithm - Specify the hash algorithm to be used for the operation. Supported algorithms are: sha1, sha2-224, sha2-256, sha2-384, sha2-512. Defaults to sha2-256 if not set.
      Returns:
      this builder.
    • prehashed

      public VaultSignRequest.VaultSignRequestBuilder prehashed(boolean prehashed)
      Set to true when the input is already hashed. If the key type is rsa-2048, rsa-3072, or rsa-4096 then specify the algorithm used to hash the input through hashAlgorithm(String).
      Parameters:
      prehashed - whether the input is already hashed.
      Returns:
      this builder.
      Since:
      3.1
    • signatureAlgorithm

      public VaultSignRequest.VaultSignRequestBuilder signatureAlgorithm(String signatureAlgorithm)
      Configure the signature algorithm to be used for the operation when using an RSA key.
      Parameters:
      signatureAlgorithm - Specify the signature algorithm to be used for the operation. Supported algorithms are: pss, pkcs1v15. Defaults to pss if not set.
      Returns:
      this builder.
    • build

      public VaultSignRequest build()
      Build a new VaultSignRequest instance. Requires plaintext(Plaintext) to be configured.
      Returns:
      a new VaultSignRequest.