Expand description
Hexadecimal encoding and decoding (RFC 4648 §8, Base16).
Zero-dependency replacement for the hex crate.
§Supply Chain Sovereignty
This module has zero external dependencies. It replaces the hex crate
for the nexcore ecosystem, eliminating supply chain risk for hex encoding.
§Examples
use nexcore_codec::hex;
let encoded = hex::encode(b"Hello");
assert_eq!(encoded, "48656c6c6f");
let decoded = hex::decode("48656c6c6f").unwrap();
assert_eq!(decoded, b"Hello");Enums§
- Decode
Error - Error returned when decoding an invalid hex string.
Functions§
- decode
- Decode a hex string to bytes.
- encode
- Encode bytes to a lowercase hex string.
- encode_
upper - Encode bytes to an uppercase hex string.