5MP Motion Camera JPEG Image and Movie Catcher  1.1.1.1
A CGI interface to capture and display pictures and movies using OpenCV.
Base64 Class Reference

#include <base64.hpp>

Static Public Member Functions

static int encode_len (int len)
 
static int encode (char *coded_dst, const unsigned char *plain_src, int len_plain_src)
 
static unsigned int decode_len (const char *buf_coded)
 
static unsigned int decode (char *buf_plain, const char *buf_coded)
 
static string encode (const std::string &s)
 
static string decode (const std::string &s)
 

Member Function Documentation

◆ decode() [1/2]

unsigned int Base64::decode ( char *  buf_plain,
const char *  buf_coded 
)
static

Decodes the base64 encoded C string buf_coded and places it in buf_plain.

Parameters
buf_plainbase64 decoded (plain) C string (output).
buf_codedbase64 encoded C string (input).
Returns
the number of bytes decoded.

◆ decode() [2/2]

static string Base64::decode ( const std::string &  s)
static

◆ decode_len()

unsigned int Base64::decode_len ( const char *  buf_coded)
static

Calculates and returns the decoded (plain) length for a given base64 encoded C string.

Parameters
buf_codedbase64 encoded C string
Returns
the decoded (plain) length in bytes.

◆ encode() [1/2]

int Base64::encode ( char *  coded_dst,
const unsigned char *  plain_src,
int  len_plain_src 
)
static

Base64 encodes the C string plain_src and places it in coded_dst.

Parameters
coded_dstbase64 encoded C string (input).
plain_srcbase64 decoded (plain) C string (output).
len_plain_srcthe length of plain_src in bytes.
Returns
the number of bytes encoded.

◆ encode() [2/2]

static string Base64::encode ( const std::string &  s)
static

◆ encode_len()

int Base64::encode_len ( int  len)
static

Calculates and returns the encoded (base64) length for a given plain C string.

Parameters
lenthe length of the plain string in bytes.
Returns
the encoded length for the given input.

The documentation for this class was generated from the following files: