lum_ccc_rust/crates/ccc-crypto-rustcrypto/src/lib.rs

33 lines
1006 B
Rust

//! # ccc-crypto-rustcrypto
//!
//! Pure-Rust implementation of the CCC provider traits, built on the
//! RustCrypto crates. It is the independent second implementation next to
//! `ccc-crypto-wolfssl` (design: "Provider diversity") and the provider a
//! web build would use. It is not a FIPS module: `fips_mode()` is `false`.
//!
//! Call [`init()`] once at start-up to register it in the global
//! [`ProviderRegistry`][ccc_crypto_core::registry::ProviderRegistry].
#![forbid(unsafe_code)]
pub mod aead;
pub mod capabilities;
pub mod hash;
pub mod kdf;
pub mod kem;
pub mod mac;
pub mod provider;
pub mod self_test;
pub use provider::RustCryptoProvider;
/// The provider's registry name.
pub const PROVIDER_NAME: &str = "rustcrypto";
/// Register a [`RustCryptoProvider`] in the global registry.
pub fn init() {
ccc_crypto_core::ProviderRegistry::global()
.register(PROVIDER_NAME, Box::new(RustCryptoProvider::new()));
log::info!("[ccc-crypto-rustcrypto] provider registered");
}