The FreeRADIUS server
$Id: 15bac2a4c627c01d1aa2047687b3418955ac7f00 $
|
#include <freeradius-devel/util/base16.h>
Go to the source code of this file.
Macros | |
#define | us(x) (uint8_t) x |
Encode/decode binary data using printable characters (base16 format - hex) More... | |
Functions | |
fr_slen_t | fr_base16_decode_nstd (fr_sbuff_parse_error_t *err, fr_dbuff_t *out, fr_sbuff_t *in, bool no_trailing, uint8_t const alphabet[static UINT8_MAX+1]) |
Decode base16 encoded input. More... | |
fr_slen_t | fr_base16_encode_nstd (fr_sbuff_t *out, fr_dbuff_t *in, char const alphabet[static UINT8_MAX+1]) |
Convert binary data to a hex string. More... | |
Variables | |
uint8_t const | fr_base16_alphabet_decode_mc [UINT8_MAX+1] |
Mixed case decode alphabet for base16. More... | |
char const | fr_base16_alphabet_encode_lc [UINT8_MAX+1] |
lower case encode alphabet for base16 More... | |
char const | fr_base16_alphabet_encode_uc [UINT8_MAX+1] |
lower case encode alphabet for base16 More... | |
Encode/decode binary data using printable characters (base16 format - hex)
fr_slen_t fr_base16_decode_nstd | ( | fr_sbuff_parse_error_t * | err, |
fr_dbuff_t * | out, | ||
fr_sbuff_t * | in, | ||
bool | no_trailing, | ||
uint8_t const | alphabet[static UINT8_MAX+1] | ||
) |
Decode base16 encoded input.
[out] | err | If non-null contains any parse errors. |
[out] | out | Where to write the decoded binary data. |
[in] | in | String to decode. |
[in] | no_trailing | Error out if we find non-base16 characters at the end of the string. |
[in] | alphabet | to use for decoding. |
Definition at line 144 of file base16.c.
fr_slen_t fr_base16_encode_nstd | ( | fr_sbuff_t * | out, |
fr_dbuff_t * | in, | ||
char const | alphabet[static UINT8_MAX+1] | ||
) |
Convert binary data to a hex string.
Ascii encoded hex string will not be prefixed with '0x'
[out] | out | Output buffer to write to. |
[in] | in | input. |
[in] | alphabet | to use for encode. |
Definition at line 115 of file base16.c.
Mixed case decode alphabet for base16.
char const fr_base16_alphabet_encode_lc[UINT8_MAX+1] |
lower case encode alphabet for base16
Encode/decode binary data using printable characters (base16 format - hex)
char const fr_base16_alphabet_encode_uc[UINT8_MAX+1] |