Skip to main content

Module hex

Module hex 

Expand description

Small ASCII-hex utilities for single-byte parse/format.

For bulk encode/decode prefer the hex crate. These helpers are useful in tight inner loops (URI percent-decoding, TLS keylog parsing, fingerprint formatting).

Functions§

decode_pair
Decode a %XX-style hex pair to its byte value, or None if either nibble is not a valid hex digit.
nibble
ASCII hex digit → 0..=15, None for non-hex bytes.