pub(crate) mod aead;
pub(crate) mod buffer;
pub(crate) mod cipher_suite;
pub(crate) mod key_derivation;
pub use aead::{AeadDecrypt, AeadEncrypt};
pub use buffer::{DecryptionBufferView, EncryptionBufferView};
pub use key_derivation::{
KeyDerivation, Ratcheting, get_hkdf_key_expand_label, get_hkdf_ratchet_expand_label,
get_hkdf_salt_expand_label,
};
cfg_if::cfg_if! {
if #[cfg(crypto_backend)] {
pub(crate) mod secret;
pub use secret::Secret;
}
}
cfg_if::cfg_if! {
if #[cfg(ring_backend)] {
pub(crate) mod ring;
pub type Aead = ring::Aead;
pub type Kdf = ring::Kdf;
} else if #[cfg(openssl_backend)] {
mod common;
pub(crate) mod openssl;
pub type Aead = openssl::Aead;
pub type Kdf = openssl::Kdf;
} else if #[cfg(rust_crypto_backend)] {
mod common;
pub(crate) mod rust_crypto;
pub type Aead = rust_crypto::Aead;
pub type Kdf = rust_crypto::Kdf;
}
}
#[cfg(any(
all(feature = "ring", feature = "openssl"),
all(feature = "ring", feature = "rust-crypto"),
all(feature = "openssl", feature = "rust-crypto"),
))]
compile_error!("Cannot configure multiple crypto backends at the same time.");