Skip to main content

nym_crypto/
lib.rs

1// Copyright 2021 - Nym Technologies SA <contact@nymtech.net>
2// SPDX-License-Identifier: Apache-2.0
3
4#[cfg(feature = "asymmetric")]
5pub mod asymmetric;
6pub mod bech32_address_validation;
7#[cfg(feature = "hashing")]
8pub mod crypto_hash;
9#[cfg(feature = "hashing")]
10pub mod hkdf;
11#[cfg(feature = "hashing")]
12pub mod hmac;
13#[cfg(feature = "hashing")]
14pub mod kdf;
15#[cfg(all(feature = "asymmetric", feature = "hashing", feature = "stream_cipher"))]
16pub mod shared_key;
17pub mod symmetric;
18
19#[cfg(feature = "hashing")]
20pub use digest::{Digest, OutputSizeUser};
21#[cfg(any(feature = "hashing", feature = "stream_cipher", feature = "aead"))]
22pub use generic_array;
23
24// with the below my idea was to try to introduce having a single place of importing all hashing, encryption,
25// etc. algorithms and import them elsewhere as needed via common/crypto
26#[cfg(feature = "stream_cipher")]
27pub use aes;
28#[cfg(feature = "aead")]
29pub use aes_gcm_siv::{Aes128GcmSiv, Aes256GcmSiv};
30#[cfg(feature = "hashing")]
31pub use blake3;
32#[cfg(feature = "stream_cipher")]
33pub use ctr;