#include <freeradius-devel/missing.h>
#include <freeradius-devel/util/sbuff.h>
#include <freeradius-devel/util/dbuff.h>
#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
#include <sys/types.h>
Go to the source code of this file.
|
#define | fr_base32_decode(_out, _in, _expect_padding, _no_trailing) fr_base32_decode_nstd(NULL, _out, _in, _expect_padding, _no_trailing, fr_base32_alphabet_decode) |
|
#define | fr_base32_encode(_out, _in, _add_padding) fr_base32_encode_nstd(_out, _in, _add_padding, fr_base32_alphabet_encode) |
|
◆ fr_base32_decode
◆ fr_base32_encode
◆ fr_base32_decode_nstd()
◆ fr_base32_encode_nstd()
Base 64 encode binary data.
base32 encode in bytes to base32, writing to out.
- Parameters
-
[out] | out | Where to write base32 string. |
[in] | in | Data to encode. |
[in] | add_padding | Add padding bytes. |
[in] | alphabet | to use for encoding. |
- Returns
- Amount of data we wrote to the buffer.
- <0 the number of bytes we would have needed in the ouput buffer.
Definition at line 190 of file base32.c.
◆ fr_is_base32_nstd()
static bool fr_is_base32_nstd |
( |
char |
c, |
|
|
uint8_t const |
alphabet[static UINT8_MAX] |
|
) |
| |
|
inlinestatic |
Check if char is in base32 alphabet.
Note that '=' is padding and not considered to be part of the alphabet.
- Parameters
-
[in] | c | char to check. |
[in] | alphabet | to use. |
- Returns
- true if c is a character from the base32 alphabet.
- false if character is not in the base32 alphabet.
Definition at line 54 of file base32.h.
◆ fr_base32_alphabet_decode
◆ fr_base32_alphabet_encode
char const fr_base32_alphabet_encode[UINT8_MAX] |
|
extern |
◆ fr_base32_hex_alphabet_decode
◆ fr_base32_hex_alphabet_encode
char const fr_base32_hex_alphabet_encode[UINT8_MAX] |
|
extern |