Macros | Functions | Variables
base64.c File Reference
#include "syshead.h"
#include "base64.h"
#include "memdbg.h"
Include dependency graph for base64.c:

Go to the source code of this file.


#define DECODE_ERROR   0xffffffff


int openvpn_base64_encode (const void *data, int size, char **str)
static int pos (char c)
static unsigned int token_decode (const char *token)
int openvpn_base64_decode (const char *str, void *data, int size)


static char base64_chars []

Macro Definition Documentation


#define DECODE_ERROR   0xffffffff

Definition at line 120 of file base64.c.

Referenced by openvpn_base64_decode(), and token_decode().

Function Documentation

◆ openvpn_base64_decode()

int openvpn_base64_decode ( const char *  str,
void *  data,
int  size 

◆ openvpn_base64_encode()

int openvpn_base64_encode ( const void *  data,
int  size,
char **  str 

Definition at line 54 of file base64.c.

References base64_chars, and malloc.

Referenced by get_sig_from_man(), get_user_pass_cr(), make_base64_string2(), and verify_user_pass().

◆ pos()

static int pos ( char  c)

Definition at line 107 of file base64.c.

References base64_chars.

Referenced by token_decode(), UpdateWaitHandles(), and we_init().

◆ token_decode()

static unsigned int token_decode ( const char *  token)

Definition at line 123 of file base64.c.

References DECODE_ERROR, and pos().

Referenced by openvpn_base64_decode().

Variable Documentation

◆ base64_chars

char base64_chars[]
Initial value:

Definition at line 46 of file base64.c.

Referenced by openvpn_base64_decode(), openvpn_base64_encode(), and pos().