pub fn decode(hex_str: &str) -> Result<Vec<u8>, String>
Converts a hex string to a vector of bytes
Returns an error if hex_str contains a non-hex digit.
hex_str