DSL
Macros | Functions
Base64 Encoding & Decoding

Macros

#define base64_encode_buffer_size(n)   ((((4 * (n)) / 3) + 3) & ~3)
 

Functions

DSL_API int DSL_CC base64_encode (const void *inBuffer, size_t count, char *outBuffer)
 
DSL_API int DSL_CC base64_decode (const char *inBuffer, size_t count, void *outBuffer)
 

Detailed Description

Function Documentation

◆ base64_decode()

DSL_API int DSL_CC base64_decode ( const char *  inBuffer,
size_t  count,
void *  outBuffer 
)

Decodes a base64 string to binary data.

Returns
The length of the decoded data.

Definition at line 183 of file base64.cpp.

◆ base64_encode()

DSL_API int DSL_CC base64_encode ( const void *  inBuffer,
size_t  count,
char *  outBuffer 
)

Encodes binary data to a base64 string. outBuffer should be at least base64_encode_buffer_size(count) bytes long.

Returns
The length of the encoded string.

Definition at line 74 of file base64.cpp.