secure_gate/
lib.rs

1// src/lib.rs
2// secure-gate v0.5.1
3
4#![cfg_attr(not(feature = "zeroize"), forbid(unsafe_code))]
5extern crate alloc;
6
7// Core modules
8mod dynamic;
9mod fixed;
10mod macros;
11
12// Feature-gated modules
13#[cfg(feature = "zeroize")]
14mod zeroize;
15
16#[cfg(feature = "serde")]
17mod serde;
18
19// Public API
20pub use dynamic::Dynamic;
21pub use fixed::Fixed;
22
23// Zeroize integration (opt-in)
24#[cfg(feature = "zeroize")]
25pub use zeroize::{DynamicZeroizing, FixedZeroizing};
26
27// Re-export Zeroizing cleanly — no privacy conflict
28#[cfg(feature = "zeroize")]
29pub type Zeroizing<T> = ::zeroize::Zeroizing<T>;
30
31// Re-export the trait and marker directly from the zeroize crate
32#[cfg(feature = "zeroize")]
33pub use ::zeroize::{Zeroize, ZeroizeOnDrop};