aws_esdk/deps/aws_cryptography_primitives/operation/
h_mac.rs1#[derive(::std::clone::Clone, ::std::default::Default, ::std::fmt::Debug)]
6#[non_exhaustive]
7pub struct HMac;
8impl HMac {
9 pub fn new() -> Self {
11 Self
12 }
13
14 pub(crate) async fn send(
15 client: &crate::deps::aws_cryptography_primitives::client::Client,
16 input: crate::deps::aws_cryptography_primitives::operation::h_mac::HMacInput,
17 ) -> ::std::result::Result<
18 ::aws_smithy_types::Blob,
19 crate::deps::aws_cryptography_primitives::types::error::Error,
20 > {
21 crate::deps::aws_cryptography_primitives::validation::validate_aws_Pcryptography_Pprimitives_HHMacInput_for_AwsCryptographicPrimitives_HMac(&input)
22 .map_err(crate::deps::aws_cryptography_primitives::types::error::Error::wrap_validation_err)?;
23 let inner_input =
24 crate::deps::aws_cryptography_primitives::conversions::h_mac::_h_mac_input::to_dafny(
25 input,
26 );
27 let inner_result = ::dafny_runtime::md!(client.dafny_client.clone()).HMac(&inner_input);
28 if matches!(
29 inner_result.as_ref(),
30 crate::r#_Wrappers_Compile::Result::Success { .. }
31 ) {
32 Ok(crate::standard_library_conversions::blob_from_dafny(
33 inner_result.value().clone(),
34 ))
35 } else {
36 Err(
37 crate::deps::aws_cryptography_primitives::conversions::error::from_dafny(
38 inner_result.error().clone(),
39 ),
40 )
41 }
42 }
43}
44
45pub use crate::deps::aws_cryptography_primitives::operation::h_mac::_h_mac_output::HMacOutput;
46
47pub use crate::deps::aws_cryptography_primitives::operation::h_mac::_h_mac_input::HMacInput;
48
49pub(crate) mod _h_mac_output;
50
51pub(crate) mod _h_mac_input;
52
53pub mod builders;