sptk2 logo
SPTK Home Page
Static Public Member Functions | List of all members
sptk::Base64 Class Reference

Base64 encoding/decoding. More...

#include <Base64.h>

Static Public Member Functions

static void encode (Buffer &bufDest, const uint8_t *bufSource, size_t len)
 Data encoding. Encodes data (base64) in given buffer bufSource to destination buffer bufDest. More...
 
static void encode (Buffer &bufDest, const Buffer &bufSource)
 Data encoding. Encodes data (base64) in given buffer bufSource to destination buffer bufDest. More...
 
static void encode (String &strDest, const Buffer &bufSource)
 Data encoding. Encodes data (base64) in given buffer bufSource and returns result in std::string. More...
 
static size_t decode (Buffer &bufDest, const Buffer &bufSource)
 Data decoding. Decodes base64 encoded buffer bufSource into buffer bufDest. Throws CException in case of error. More...
 
static size_t decode (Buffer &bufDest, const String &strSource)
 Data decoding. Decodes base64 encoded string strSource into buffer bufDest. Throws CException in case of error. More...
 

Detailed Description

Base64 encoding/decoding.

This class is used for encoding and decoding the parts of mail messages. All the methods of this class are static.

Member Function Documentation

◆ decode() [1/2]

static size_t sptk::Base64::decode ( Buffer bufDest,
const Buffer bufSource 
)
static

Data decoding. Decodes base64 encoded buffer bufSource into buffer bufDest. Throws CException in case of error.

Parameters
bufDestDestination buffer
bufSourceSource buffer that holds base64 decoded data
Returns
length of returned buffer

◆ decode() [2/2]

static size_t sptk::Base64::decode ( Buffer bufDest,
const String strSource 
)
static

Data decoding. Decodes base64 encoded string strSource into buffer bufDest. Throws CException in case of error.

Parameters
bufDestDestination buffer
strSourceSource string that holds base64 decoded data
Returns
length of the returned string

◆ encode() [1/3]

static void sptk::Base64::encode ( Buffer bufDest,
const Buffer bufSource 
)
static

Data encoding. Encodes data (base64) in given buffer bufSource to destination buffer bufDest.

Parameters
bufDestDestination buffer
bufSourceSource buffer

◆ encode() [2/3]

static void sptk::Base64::encode ( Buffer bufDest,
const uint8_t *  bufSource,
size_t  len 
)
static

Data encoding. Encodes data (base64) in given buffer bufSource to destination buffer bufDest.

Parameters
bufDestDestination buffer
bufSourceSource buffer
lenSize of source buffer

◆ encode() [3/3]

static void sptk::Base64::encode ( String strDest,
const Buffer bufSource 
)
static

Data encoding. Encodes data (base64) in given buffer bufSource and returns result in std::string.

Parameters
strDestDestination string
bufSourceSource buffer

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

Fri Oct 14 2022 09:58:32: SPTK 5.4.1