OpenVPN
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.

Macros

#define DECODE_ERROR   0xffffffff
 

Functions

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)
 

Variables

static char base64_chars []
 

Macro Definition Documentation

◆ DECODE_ERROR

#define DECODE_ERROR   0xffffffff

Definition at line 118 of file base64.c.

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 52 of file base64.c.

References base64_chars.

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

◆ pos()

static int pos ( char  c)
static

Definition at line 105 of file base64.c.

References base64_chars.

Referenced by token_decode(), and UpdateWaitHandles().

◆ token_decode()

static unsigned int token_decode ( const char *  token)
static

Definition at line 121 of file base64.c.

References DECODE_ERROR, and pos().

Referenced by openvpn_base64_decode().

Variable Documentation

◆ base64_chars

char base64_chars[]
static
Initial value:
=
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"

Definition at line 44 of file base64.c.

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