#![crate_name = "exonum_sodiumoxide"]
#![crate_type = "lib"]
#![warn(
missing_docs,
non_upper_case_globals,
non_camel_case_types,
unused_qualifications
)]
#![allow(clippy::result_unit_err)]
#![cfg_attr(not(feature = "std"), no_std)]
#![cfg_attr(not(feature = "std"), feature(alloc))]
#![cfg_attr(not(feature = "std"), feature(collections))]
#[cfg(not(feature = "std"))]
extern crate alloc;
extern crate libc;
extern crate libsodium_sys as ffi;
#[cfg(any(test, feature = "serde"))]
extern crate serde;
#[cfg(all(test, not(feature = "std")))]
extern crate std;
#[cfg(all(not(test), not(feature = "std")))]
mod std {
pub use core::{cmp, fmt, hash, iter, mem, ops, slice, str};
}
#[cfg(not(feature = "std"))]
mod prelude {
pub use collections::{String, Vec};
}
pub fn init() -> bool {
unsafe { ffi::sodium_init() != -1 }
}
#[macro_use]
mod newtype_macros;
pub mod randombytes;
pub mod utils;
pub mod version;
#[cfg(test)]
mod test_utils;
pub mod crypto {
pub mod aead;
pub mod auth;
pub mod box_;
pub mod hash;
pub mod kx;
pub mod onetimeauth;
pub mod pwhash;
pub mod scalarmult;
pub mod sealedbox;
pub mod secretbox;
pub mod shorthash;
pub mod sign;
pub mod stream;
pub mod verify;
}