Struct aws_sdk_kms::operation::generate_mac::GenerateMacInput
source · #[non_exhaustive]pub struct GenerateMacInput {
pub message: Option<Blob>,
pub key_id: Option<String>,
pub mac_algorithm: Option<MacAlgorithmSpec>,
pub grant_tokens: Option<Vec<String>>,
pub dry_run: Option<bool>,
}
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. }
syntax; cannot be matched against without a wildcard ..
; and struct update syntax will not work.message: Option<Blob>
The message to be hashed. Specify a message of up to 4,096 bytes.
GenerateMac
and VerifyMac
do not provide special handling for message digests. If you generate an HMAC for a hash digest of a message, you must verify the HMAC of the same hash digest.
key_id: Option<String>
The HMAC KMS key to use in the operation. The MAC algorithm computes the HMAC for the message and the key as described in RFC 2104.
To identify an HMAC KMS key, use the DescribeKey
operation and see the KeySpec
field in the response.
mac_algorithm: Option<MacAlgorithmSpec>
The MAC algorithm used in the operation.
The algorithm must be compatible with the HMAC KMS key that you specify. To find the MAC algorithms that your HMAC KMS key supports, use the DescribeKey
operation and see the MacAlgorithms
field in the DescribeKey
response.
grant_tokens: Option<Vec<String>>
A list of grant tokens.
Use a grant token when your permission to call this operation comes from a new grant that has not yet achieved eventual consistency. For more information, see Grant token and Using a grant token in the Key Management Service Developer Guide.
dry_run: Option<bool>
Checks if your request will succeed. DryRun
is an optional parameter.
To learn more about how to use this parameter, see Testing your KMS API calls in the Key Management Service Developer Guide.
Implementations§
source§impl GenerateMacInput
impl GenerateMacInput
sourcepub fn message(&self) -> Option<&Blob>
pub fn message(&self) -> Option<&Blob>
The message to be hashed. Specify a message of up to 4,096 bytes.
GenerateMac
and VerifyMac
do not provide special handling for message digests. If you generate an HMAC for a hash digest of a message, you must verify the HMAC of the same hash digest.
sourcepub fn key_id(&self) -> Option<&str>
pub fn key_id(&self) -> Option<&str>
The HMAC KMS key to use in the operation. The MAC algorithm computes the HMAC for the message and the key as described in RFC 2104.
To identify an HMAC KMS key, use the DescribeKey
operation and see the KeySpec
field in the response.
sourcepub fn mac_algorithm(&self) -> Option<&MacAlgorithmSpec>
pub fn mac_algorithm(&self) -> Option<&MacAlgorithmSpec>
The MAC algorithm used in the operation.
The algorithm must be compatible with the HMAC KMS key that you specify. To find the MAC algorithms that your HMAC KMS key supports, use the DescribeKey
operation and see the MacAlgorithms
field in the DescribeKey
response.
sourcepub fn grant_tokens(&self) -> &[String]
pub fn grant_tokens(&self) -> &[String]
A list of grant tokens.
Use a grant token when your permission to call this operation comes from a new grant that has not yet achieved eventual consistency. For more information, see Grant token and Using a grant token in the Key Management Service Developer Guide.
If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use .grant_tokens.is_none()
.
sourcepub fn dry_run(&self) -> Option<bool>
pub fn dry_run(&self) -> Option<bool>
Checks if your request will succeed. DryRun
is an optional parameter.
To learn more about how to use this parameter, see Testing your KMS API calls in the Key Management Service Developer Guide.
source§impl GenerateMacInput
impl GenerateMacInput
sourcepub fn builder() -> GenerateMacInputBuilder
pub fn builder() -> GenerateMacInputBuilder
Creates a new builder-style object to manufacture GenerateMacInput
.
Trait Implementations§
source§impl Clone for GenerateMacInput
impl Clone for GenerateMacInput
source§fn clone(&self) -> GenerateMacInput
fn clone(&self) -> GenerateMacInput
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for GenerateMacInput
impl Debug for GenerateMacInput
source§impl PartialEq for GenerateMacInput
impl PartialEq for GenerateMacInput
source§fn eq(&self, other: &GenerateMacInput) -> bool
fn eq(&self, other: &GenerateMacInput) -> bool
self
and other
values to be equal, and is used
by ==
.