OpenVPN
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 [] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"

Macro Definition Documentation

◆ DECODE_ERROR

#define DECODE_ERROR   0xffffffff

Definition at line 116 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 )

◆ pos()

int pos ( char c)
static

Definition at line 104 of file base64.c.

References base64_chars.

Referenced by GetItfDnsServersV6(), SetNrptRules(), token_decode(), and UpdateWaitHandles().

◆ token_decode()

unsigned int token_decode ( const char * token)
static

Definition at line 119 of file base64.c.

References DECODE_ERROR, pos(), and unlikely.

Referenced by openvpn_base64_decode().

Variable Documentation

◆ base64_chars

char base64_chars[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"
static

Definition at line 44 of file base64.c.

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