pub trait FromHexStr {
// Required method
fn try_from_hex(&self) -> Result<Vec<u8>, HexError>;
}Expand description
Extension trait for decoding hex strings to byte data.
Input should be treated as untrusted; use fallible methods.
§Security Warning
Decoding input from untrusted sources should use fallible try_ methods.
Invalid input may indicate tampering or errors.
§Example
use secure_gate::FromHexStr;
let hex_string = "424344";
let bytes = hex_string.try_from_hex().unwrap();
// bytes is now Vec<u8>: [66, 66, 66]