Skip to main content

aws_esdk/deps/aws_cryptography_primitives/
client.rs

1// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved.
2// SPDX-License-Identifier: Apache-2.0
3// Do not modify this file. This file is machine generated, and any changes to it will be overwritten.
4use aws_smithy_types::error::operation::BuildError;
5
6#[derive(::std::clone::Clone, ::std::fmt::Debug, ::std::cmp::PartialEq)]
7#[allow(missing_docs)]
8pub struct Client {
9    pub(crate) dafny_client: ::dafny_runtime::Object<dyn crate::r#software::amazon::cryptography::primitives::internaldafny::types::IAwsCryptographicPrimitivesClient>
10}
11
12impl Client {
13    /// Creates a new client from the service [`Config`](crate::Config).
14    #[track_caller]
15    pub fn from_conf(
16        input: crate::deps::aws_cryptography_primitives::types::crypto_config::CryptoConfig,
17    ) -> Result<Self, crate::deps::aws_cryptography_primitives::types::error::Error> {
18        crate::deps::aws_cryptography_primitives::validation::validate_aws_Pcryptography_Pprimitives_HCryptoConfig(&input)
19            .map_err(crate::deps::aws_cryptography_primitives::types::error::Error::wrap_validation_err)?;
20        let inner =
21            crate::software::amazon::cryptography::primitives::internaldafny::_default::AtomicPrimitives(
22                &crate::deps::aws_cryptography_primitives::conversions::crypto_config::_crypto_config::to_dafny(input),
23            );
24        if matches!(
25            inner.as_ref(),
26            crate::_Wrappers_Compile::Result::Failure { .. }
27        ) {
28            return Err(
29                crate::deps::aws_cryptography_primitives::conversions::error::from_dafny(
30                    inner.as_ref().error().clone(),
31                ),
32            );
33        }
34        Ok(Self {
35            dafny_client: ::dafny_runtime::upcast_object()(inner.Extract()),
36        })
37    }
38}
39
40mod generate_random_bytes;
41
42mod digest;
43
44mod h_mac;
45
46mod hkdf_extract;
47
48mod hkdf_expand;
49
50mod hkdf;
51
52mod kdf_counter_mode;
53
54mod aes_kdf_counter_mode;
55
56mod aes_encrypt;
57
58mod aes_decrypt;
59
60mod generate_rsa_key_pair;
61
62mod get_rsa_key_modulus_length;
63
64mod rsa_decrypt;
65
66mod rsa_encrypt;
67
68mod generate_ecdsa_signature_key;
69
70mod ecdsa_sign;
71
72mod ecdsa_verify;
73
74mod generate_ecc_key_pair;
75
76mod get_public_key_from_private_key;
77
78mod validate_public_key;
79
80mod derive_shared_secret;
81
82mod compress_public_key;
83
84mod decompress_public_key;
85
86mod parse_public_key;