53 const char delimiter[2] = { separator,
'\0' };
59 for ( i = 0 ; i <
raw_len ; i++ ) {
61 "%s%02x", ( used ? delimiter :
"" ),
78 unsigned int count = 0;
79 unsigned int sixteens;
85 if (
count && separator && ( ( *(encoded++) != separator ) ) )
102 out[
count] = ( ( sixteens << 4 ) | units );
#define EINVAL
Invalid argument.
unsigned int digit_value(unsigned int character)
Calculate digit value.
int ssnprintf(char *buf, ssize_t ssize, const char *fmt,...)
Version of vsnprintf() that accepts a signed buffer size.
FILE_LICENCE(GPL2_OR_LATER_OR_UBDL)
int hex_decode(char separator, const char *encoded, void *data, size_t len)
Decode hexadecimal string (with optional byte separator character)
size_t hex_encode(char separator, const void *raw, size_t raw_len, char *data, size_t len)
Encode hexadecimal string (with optional byte separator character)
uint16_t count
Number of entries.
uint8_t data[48]
Additional event data.