Skip to main content

parse_hex

Function parse_hex 

Source
pub fn parse_hex(hex_str: &[u8]) -> Option<[u8; 20]>
Expand description

Parse a 40-character ASCII hex string into a SHA-1 digest. Returns None on malformed input (wrong length or non-hex chars).