Class VaultSignatureVerificationRequest.VaultSignatureVerificationRequestBuilder
java.lang.Object
org.springframework.vault.support.VaultSignatureVerificationRequest.VaultSignatureVerificationRequestBuilder
- Enclosing class:
- VaultSignatureVerificationRequest
public static class VaultSignatureVerificationRequest.VaultSignatureVerificationRequestBuilder
extends Object
Builder to build a
VaultSignatureVerificationRequest
.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionDeprecated.build()
Build a newVaultSignatureVerificationRequest
instance.hashAlgorithm
(String hashAlgorithm) Configure the hash algorithm to be used for the operation.Configure theHmac
to be verified.Configure thePlaintext
input to be used to verify the signature.prehashed
(boolean prehashed) Set to true when the input is already hashed.Configure theSignature
to be verified.signatureAlgorithm
(String signatureAlgorithm) Configure the signature algorithm to be used for the operation when using an RSA key.
-
Constructor Details
-
VaultSignatureVerificationRequestBuilder
public VaultSignatureVerificationRequestBuilder()
-
-
Method Details
-
plaintext
public VaultSignatureVerificationRequest.VaultSignatureVerificationRequestBuilder plaintext(Plaintext input) Configure thePlaintext
input to be used to verify the signature.- Parameters:
input
- base input, must not be null.- Returns:
this
VaultSignatureVerificationRequest.VaultSignatureVerificationRequestBuilder
.
-
signature
public VaultSignatureVerificationRequest.VaultSignatureVerificationRequestBuilder signature(Signature signature) Configure theSignature
to be verified. Signature verification requires either aSignature
or ahmac(Hmac)
to be configured. Clears any previously configuredhmac(Hmac)
.- Parameters:
signature
- to be verified, must not be null.- Returns:
this
VaultSignatureVerificationRequest.VaultSignatureVerificationRequestBuilder
.
-
hmac
Configure theHmac
to be verified. Signature verification requires either aHmac
or asignature(Signature)
to be configured. Clears any previously configuredSignature
.- Parameters:
hmac
- to be verified, must not be null.- Returns:
this
VaultSignatureVerificationRequest.VaultSignatureVerificationRequestBuilder
.
-
hashAlgorithm
public VaultSignatureVerificationRequest.VaultSignatureVerificationRequestBuilder 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
VaultSignatureVerificationRequest.VaultSignatureVerificationRequestBuilder
.- Since:
- 2.4
-
prehashed
public VaultSignatureVerificationRequest.VaultSignatureVerificationRequestBuilder 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 throughhashAlgorithm(String)
.- Parameters:
prehashed
- whether the input is already hashed.- Returns:
this
VaultSignatureVerificationRequest.VaultSignatureVerificationRequestBuilder
.- Since:
- 3.1
-
signatureAlgorithm
public VaultSignatureVerificationRequest.VaultSignatureVerificationRequestBuilder 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
VaultSignatureVerificationRequest.VaultSignatureVerificationRequestBuilder
.- Since:
- 2.4
-
algorithm
@Deprecated(since="2.4") public VaultSignatureVerificationRequest.VaultSignatureVerificationRequestBuilder algorithm(String algorithm) Deprecated.since 2.4, usesignatureAlgorithm(String)
instead.Configure the algorithm to be used for the operation.- Parameters:
algorithm
- Specify the algorithm to be used for the operation. Supported algorithms are: sha2-224, sha2-256, sha2-384, sha2-512. Defaults to sha2-256 if not set.- Returns:
this
VaultSignatureVerificationRequest.VaultSignatureVerificationRequestBuilder
.
-
build
Build a newVaultSignatureVerificationRequest
instance. Requiresplaintext(Plaintext)
and one ofhmac(Hmac)
,signature(Signature)
to be configured.- Returns:
- a new
VaultHmacRequest
.
-
signatureAlgorithm(String)
instead.