secure_gate/lib.rs
1// ==========================================================================
2// src/lib.rs
3// ==========================================================================
4
5#![cfg_attr(not(feature = "zeroize"), forbid(unsafe_code))]
6#![doc = include_str!("../README.md")]
7
8extern crate alloc;
9
10// ── Core secret types (always available) ─────────────────────────────
11mod dynamic;
12mod fixed;
13
14pub use dynamic::Dynamic;
15pub use fixed::Fixed;
16
17// ── Non-cloneable wrappers (always available, zero-cost, pure) ───────
18mod no_clone;
19pub use no_clone::{DynamicNoClone, FixedNoClone};
20
21// ── Macros (always available) ────────────────────────────────────────
22mod macros;
23
24// ── Feature-gated modules (zero compile-time cost when disabled) ─────
25#[cfg(feature = "rand")]
26pub mod rng;
27
28#[cfg(feature = "conversions")]
29pub mod conversions;
30
31// ── Feature-gated re-exports ─────────────────────────────────────────
32#[cfg(feature = "rand")]
33pub use rng::{DynamicRng, FixedRng};
34
35#[cfg(feature = "conversions")]
36pub use conversions::{HexString, RandomHex, SecureConversionsExt};