pub struct SignDataRequest {
pub mount: String,
pub name: String,
pub key_version: Option<u64>,
pub hash_algorithm: Option<HashAlgorithm>,
pub input: String,
pub context: Option<String>,
pub prehashed: Option<bool>,
pub signature_algorithm: Option<SignatureAlgorithm>,
pub marshaling_algorithm: Option<MarshalingAlgorithm>,
}
Expand description
§Sign Data
This endpoint returns the cryptographic signature of the given data using the named key and the specified hash algorithm. The key must be of a type that supports signing.
- Path: {self.mount}/sign/{self.name}(/{self.hash_algorithm)
- Method: POST
- Response: SignDataResponse
- Reference: https://developer.hashicorp.com/vault/api-docs/secret/transit#sign-data
Fields§
§mount: String
§name: String
§key_version: Option<u64>
Specifies the version of the key to use for the operation. If not set, uses the latest version. Must be greater than or equal to the key’s min_encryption_version, if set.
hash_algorithm: Option<HashAlgorithm>
Specifies the hash algorithm to use.
input: String
Specifies the base64 encoded input data.
context: Option<String>
Base64 encoded context for key derivation. Required if key derivation is enabled; currently only available with ed25519 keys.
prehashed: Option<bool>
Set to true when the input is already hashed. If the key type is rsa-2048, rsa-3072 or rsa-4096, then the algorithm used to hash the input should be indicated by the hash_algorithm parameter. Just as the value to sign should be the base64-encoded representation of the exact binary data you want signed, when set, input is expected to be base64-encoded binary hashed data, not hex-formatted.
signature_algorithm: Option<SignatureAlgorithm>
When using a RSA key, specifies the RSA signature algorithm to use for signing.
marshaling_algorithm: Option<MarshalingAlgorithm>
Specifies the way in which the signature should be marshaled. This currently only applies to ECDSA keys.
Implementations§
source§impl SignDataRequest
impl SignDataRequest
pub fn builder() -> SignDataRequestBuilder
Trait Implementations§
source§impl Debug for SignDataRequest
impl Debug for SignDataRequest
source§impl Default for SignDataRequest
impl Default for SignDataRequest
source§fn default() -> SignDataRequest
fn default() -> SignDataRequest
source§impl Endpoint for SignDataRequest
impl Endpoint for SignDataRequest
source§const REQUEST_BODY_TYPE: RequestType = RequestType::JSON
const REQUEST_BODY_TYPE: RequestType = RequestType::JSON
source§const RESPONSE_BODY_TYPE: ResponseType = ResponseType::JSON
const RESPONSE_BODY_TYPE: ResponseType = ResponseType::JSON
source§type Response = SignDataResponse
type Response = SignDataResponse
parse()
method is called.