Skip to main content

Module hex

Module hex 

Source
Expand description

Hex encode/decode helpers shared across sexpr consumers. Hex encoding + decoding helpers.

Every pleme-io crate that round-trips raw bytes through a canonical sexpr form (substrate-forge::program::ProgramSource::Wasm, weights-forge::storage::StorageKind::Inline, etc.) needs the same lowercase hex encode/decode pair. This module is the single copy — consumers should use iac_forge::hex; rather than reimplementing.

The encoding is lowercase (fixed) so content-hash comparisons across emitters stay stable: deadbeef ≠ DEADBEEF as strings even though they decode to the same bytes.

Functions§

decode
Decode a lowercase (or mixed-case) hex string into bytes.
encode
Encode a byte slice as a lowercase hex string.