from_hex

Function from_hex 

Source
pub fn from_hex(s: &str) -> Result<Vec<u8>, FromHexError>
Expand description

Convert hexadecimal string to bytes.

ยงExample

use quantacore::utils::from_hex;

let bytes = from_hex("deadbeef").unwrap();
assert_eq!(bytes, vec![0xde, 0xad, 0xbe, 0xef]);