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

◆ slm_util_atoh()

int slm_util_atoh ( const char * ascii,
uint16_t ascii_len,
uint8_t * hex,
uint16_t hex_len )

Decode hexdecimal string (ASCII text) to hex array.

Parameters
[in]asciiencoded hexdecimal string
[in]ascii_lensize of hexdecimal string
[out]hexdecoded hex arrary
[in]hex_lenreserved size of hex array
Returns
actual size of hex array if the operation was successful. Otherwise, a (negative) error code is returned.