OpenVPN
Macros | Functions
base64.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define OPENVPN_BASE64_LENGTH(binary_length)   ((((8 * binary_length) / 6) + 3) & ~3)
 Compute resulting base64 length. More...
 

Functions

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

Macro Definition Documentation

◆ OPENVPN_BASE64_LENGTH

#define OPENVPN_BASE64_LENGTH (   binary_length)    ((((8 * binary_length) / 6) + 3) & ~3)

Compute resulting base64 length.

6 bits per byte, padded to 4 bytes.

Definition at line 38 of file base64.h.

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().