Expand description
Encoding traits for explicit secret-to-string conversion.
Import paths:
use secure_gate::ToHex;etc. (notsecure_gate::traits::encoding::hex::ToHex)
All encoding traits require alloc (they return String or EncodedSecret).
Prefer zeroizing variants (*_zeroizing) when the encoded form is sensitive.
See the decoding module for the reverse direction.
Each encoding trait has its own feature gate:
| Trait | Feature |
|---|---|
ToHex | encoding-hex |
ToBase64Url | encoding-base64 |
ToBech32 | encoding-bech32 |
ToBech32m | encoding-bech32m |
Re-exports§
pub use base64_url::ToBase64Url;pub use bech32::ToBech32;pub use bech32m::ToBech32m;pub use hex::ToHex;
Modules§
- base64_
url - URL-safe Base64 encoding trait.
- bech32
- Bech32 encoding trait.
- bech32m
- Bech32m encoding trait.
- hex
- Hexadecimal encoding trait.