Dibbler - a portable DHCPv6  1.0.2RC1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
base64.c File Reference
#include "base64.h"
#include <stdlib.h>
#include <limits.h>
#include <string.h>
+ Include dependency graph for base64.c:

Macros

#define B64(_)
#define return_false
#define uchar_in_range(c)   ((c) <= 255)

Functions

bool base64_decode (struct base64_decode_context *ctx, const char *restrict in, size_t inlen, char *restrict out, size_t *outlen)
bool base64_decode_alloc (struct base64_decode_context *ctx, const char *in, size_t inlen, char **out, size_t *outlen)
void base64_decode_ctx_init (struct base64_decode_context *ctx)
void base64_encode (const char *restrict in, size_t inlen, char *restrict out, size_t outlen)
size_t base64_encode_alloc (const char *in, size_t inlen, char **out)
static bool decode_4 (char const *restrict in, size_t inlen, char *restrict *outp, size_t *outleft)
static char * get_4 (struct base64_decode_context *ctx, char const *restrict *in, char const *restrict in_end, size_t *n_non_newline)
bool isbase64 (char ch)
static unsigned char to_uchar (char ch)

Variables

static const signed char b64 [0x100]

Macro Definition Documentation

#define B64 (   _)
#define return_false
Value:
do \
{ \
*outp = out; \
return false; \
} \
while (false)
#define uchar_in_range (   c)    ((c) <= 255)

Function Documentation

bool base64_decode ( struct base64_decode_context ctx,
const char *restrict  in,
size_t  inlen,
char *restrict  out,
size_t *  outlen 
)
bool base64_decode_alloc ( struct base64_decode_context ctx,
const char *  in,
size_t  inlen,
char **  out,
size_t *  outlen 
)
void base64_decode_ctx_init ( struct base64_decode_context ctx)
void base64_encode ( const char *restrict  in,
size_t  inlen,
char *restrict  out,
size_t  outlen 
)
size_t base64_encode_alloc ( const char *  in,
size_t  inlen,
char **  out 
)
static bool decode_4 ( char const *restrict  in,
size_t  inlen,
char *restrict outp,
size_t *  outleft 
)
inlinestatic
static char* get_4 ( struct base64_decode_context ctx,
char const *restrict in,
char const *restrict  in_end,
size_t *  n_non_newline 
)
inlinestatic
bool isbase64 ( char  ch)
static unsigned char to_uchar ( char  ch)
inlinestatic

Variable Documentation

const signed char b64[0x100]
static