1#![no_std]
2#![allow(non_camel_case_types)]
3#![allow(unused_imports)]
4
5#[cfg(feature = "dynamic-loading")]
18extern crate std;
19
20#[cfg(all(
21 feature = "dynamic-loading",
22 any(feature = "vendored", feature = "static")
23))]
24compile_error!("The dynamic-loading feature cannot be combined with vendored or static linking");
25
26#[macro_use]
27mod macros;
28
29#[cfg(feature = "dynamic-loading")]
30mod loader;
31
32#[cfg(feature = "dynamic-loading")]
33pub use loader::{LoadError, last_load_error, load_library, loaded_library_name};
34
35mod block;
36mod cipher;
37mod ec_group;
38mod errors;
39mod fpe;
40mod hash;
41mod kdf;
42mod keywrap;
43mod mac;
44mod mp;
45mod oid;
46mod otp;
47mod passhash;
48mod pk_ops;
49mod pubkey;
50mod rng;
51mod spake2p;
52mod srp6;
53mod tpm2;
54mod utils;
55mod version;
56mod x509;
57mod xof;
58mod zfec;
59
60pub mod ffi_types {
61 pub use core::ffi::{c_char, c_int, c_uint, c_void};
62
63 pub type botan_view_ctx = *mut c_void;
64
65 pub type botan_view_bin_fn =
66 extern "C" fn(view_ctx: botan_view_ctx, data: *const u8, len: usize) -> c_int;
67
68 pub type botan_view_str_fn =
69 extern "C" fn(view_ctx: botan_view_ctx, data: *const c_char, len: usize) -> c_int;
70}
71
72pub use block::*;
73pub use cipher::*;
74pub use ec_group::*;
75pub use errors::*;
76pub use fpe::*;
77pub use hash::*;
78pub use kdf::*;
79pub use keywrap::*;
80pub use mac::*;
81pub use mp::*;
82pub use oid::*;
83pub use otp::*;
84pub use passhash::*;
85pub use pk_ops::*;
86pub use pubkey::*;
87pub use rng::*;
88pub use spake2p::*;
89pub use srp6::*;
90pub use tpm2::*;
91pub use utils::*;
92pub use version::*;
93pub use x509::*;
94pub use xof::*;
95pub use zfec::*;
96
97#[cfg(not(feature = "dynamic-loading"))]
103pub fn last_load_error() -> Option<&'static str> {
104 None
105}