Skip to main content

hex_to_bytes

Function hex_to_bytes 

Source
pub fn hex_to_bytes(input: &str) -> Result<Vec<u8>, BytecodeError>
Expand description

Decode a hex string into bytes, ignoring ASCII whitespace so a dump that has been wrapped across lines still decodes.

ยงErrors

Returns BytecodeError::InvalidHex when the input has an odd number of digits or contains a non-hex character.