16 #define HEX_DECODE_OPTIONAL 0x80 35 return ( (
strlen ( encoded ) + 1 ) / 2 );
40 extern int hex_decode (
char separator,
const char *encoded,
void *
data,
66 base16_decode (
const char *encoded,
void *
data,
size_t len ) {
static size_t base16_decoded_max_len(const char *encoded)
Calculate maximum length of base16-decoded string.
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)
static __attribute__((always_inline)) size_t base16_encode(const void *raw
Base16-encode data.
static size_t base16_encoded_len(size_t raw_len)
Calculate length of base16-encoded data.
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 strlen(const char *src)
Get length of string.
static size_t char size_t len
static size_t char * data