Skip to main content

parse_lowercase_hash

Function parse_lowercase_hash 

Source
pub fn parse_lowercase_hash(bytes: &[u8]) -> Option<Hash>
Expand description

Strict lowercase-only hex parser: exactly HEX_LEN lowercase-hex bytes, decoded in a single pass. SPEC-REFS §1 forbids uppercase on read; the general hash::from_hex tolerates both cases for programmatic callers, so this is the stricter variant every on-the-wire / on-disk reader (ref wire blobs, the applied-packs record) shares to keep a hand-edited or foreign-cased line malformed rather than silently accepted.