nRF Connect SDK API 0.1.0
Loading...
Searching...
No Matches

◆ hexstr2hex()

int hexstr2hex ( const char *  in,
size_t  in_len,
unsigned char *  out,
size_t  out_len 
)

Convert hex string into hex Example: in = {'D', 'E', 'A', 'D'} -> out = {0xDE, 0xAD}.

Parameters
[in]inHex string buffer to convert
[in]in_lenInput buffer length
[out]outHex buffer for the output
[in]out_lenHex buffer length, shall be at least (in_len / 2)
Returns
hex output length on success -1 on error