Function anj_hexlify
Defined in File utils.h
Function Documentation
-
int anj_hexlify(char *out_buff, size_t out_buff_size, const void *data, size_t data_len)
Encode a byte buffer as an uppercase hexadecimal string.
The hexlified buffer is guaranteed to be NULL-terminated after the function returns.
The caller must provide an output buffer large enough to hold the whole result together with the terminating null character, i.e. at least
2 * data_len + 1bytes.- Parameters:
out_buff – [out] Output buffer for the null-terminated hex string.
out_buff_size – Size of
out_buffin bytes.data – Input byte buffer.
data_len – Length of
datain bytes.
- Returns:
0 on success, -1 if
out_buffis too small.