iPXE
|
Base16 encoding. More...
#include <stdint.h>
#include <stdio.h>
#include <errno.h>
#include <assert.h>
#include <ipxe/string.h>
#include <ipxe/vsprintf.h>
#include <ipxe/base16.h>
Go to the source code of this file.
Functions | |
FILE_LICENCE (GPL2_OR_LATER_OR_UBDL) | |
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) More... | |
int | hex_decode (char separator, const char *encoded, void *data, size_t len) |
Decode hexadecimal string (with optional byte separator character) More... | |
Base16 encoding.
Definition in file base16.c.
FILE_LICENCE | ( | GPL2_OR_LATER_OR_UBDL | ) |
Encode hexadecimal string (with optional byte separator character)
separator | Byte separator character, or 0 for no separator |
raw | Raw data |
raw_len | Length of raw data |
data | Buffer |
len | Length of buffer |
len | Encoded length |
Definition at line 50 of file base16.c.
References bytes, data, len, raw, raw_len, and ssnprintf().
Referenced by format_hex_colon_setting(), format_hex_hyphen_setting(), and format_hex_raw_setting().
int hex_decode | ( | char | separator, |
const char * | encoded, | ||
void * | data, | ||
size_t | len | ||
) |
Decode hexadecimal string (with optional byte separator character)
separator | Byte separator character, or 0 for no separator |
encoded | Encoded string |
data | Buffer |
len | Length of buffer |
len | Length of data, or negative error |
Definition at line 76 of file base16.c.
References count, data, digit_value(), EINVAL, HEX_DECODE_OPTIONAL, len, and out.
Referenced by netfront_read_mac(), parse_hex_hyphen_setting(), parse_hex_raw_setting(), parse_hex_setting(), and uuid_aton().