secure_gate/encoding/extensions/
mod.rs

1//! Additional functionality and convenience methods for encoding types.
2//!
3//! This module provides extension traits and methods that enhance the core encoding
4//! functionality with features like:
5//!
6//! - **Secure Encoding Extensions**: Traits for encoding byte arrays to various formats
7//! - **View Types**: Safe access to encoded strings with decoding capabilities
8//! - **RNG Integration**: Direct encoding of random bytes to validated strings
9//! - **Consuming Methods**: Methods that consume wrappers and return decoded bytes
10//!
11//! The extensions are designed to work seamlessly with the main encoding types
12//! while maintaining security guarantees.
13
14pub mod core;
15#[cfg(feature = "encoding-hex")]
16pub mod hex;
17#[cfg(feature = "encoding-base64")]
18pub mod base64;
19#[cfg(feature = "encoding-bech32")]
20pub mod bech32;
21
22#[cfg(any(
23    feature = "encoding-hex",
24    feature = "encoding-base64",
25    feature = "encoding-bech32"
26))]
27pub use core::SecureEncodingExt;
28#[cfg(feature = "encoding-hex")]
29pub use hex::HexStringView;
30#[cfg(feature = "encoding-base64")]
31pub use base64::Base64StringView;
32#[cfg(feature = "encoding-bech32")]
33pub use bech32::Bech32StringView;