#include <freeradius-devel/libradius.h>
#include <freeradius-devel/base64.h>
Go to the source code of this file.
|
#define | B64(_) |
|
#define | us(x) (uint8_t) x |
| Encode/decode binary data using printable characters. More...
|
|
|
static const signed char | b64 [0x100] |
|
#define us |
( |
|
x | ) |
(uint8_t) x |
ssize_t fr_base64_decode |
( |
uint8_t * |
out, |
|
|
size_t |
outlen, |
|
|
char const * |
in, |
|
|
size_t |
inlen |
|
) |
| |
size_t fr_base64_encode |
( |
char * |
out, |
|
|
size_t |
outlen, |
|
|
uint8_t const * |
in, |
|
|
size_t |
inlen |
|
) |
| |
Base 64 encode binary data.
Base64 encode IN array of size INLEN into OUT array of size OUTLEN.
- Parameters
-
[out] | out | Where to write Base64 string. |
[in] | outlen | size of buffer including NULL byte. |
[in] | in | Data to encode. |
[in] | inlen | Length of data to encode. |
- Returns
- Amount of data we wrote to the buffer.
- -1 if output buffer was too small.
Definition at line 44 of file base64.c.
bool fr_is_base64 |
( |
char |
c | ) |
|
Check if char is in Base64 alphabet.
Note that '=' is padding and not considered to be part of the alphabet.
- Parameters
-
- Returns
- true if c is a character from the Base64 alphabet.
- false if character is not in the Base64 alphabet.
Definition at line 223 of file base64.c.
const signed char b64[0x100] |
|
static |