Expand description
Tiny hex encoder used wherever a byte slice needs to be rendered
as a hex string. Centralised so the same bytes.iter().map(|b| format!("{:02x}", b)).collect() doesn’t get re-typed across the
crate.
Functions§
- to_hex
- Encode
bytesas a lowercase hex string. - to_
hex_ prefix - Encode the first
nbytes (or fewer) as lowercase hex. Useful for short identifiers likebearer:<sha256-prefix>labels.