sptk2 logo
SPTK Home Page

sptk::CBase64 Class Reference
[Utility Classes]

Base64 encoding/decoding. More...

#include <CBase64.h>

List of all members.

Static Public Member Functions

static void encode (CBuffer &bufDest, const CBuffer &bufSource)
 Data encoding. Encodes data (base64) in given buffer bufSource to destination buffer bufDest.
static void encode (std::string &strDest, const CBuffer &bufSource)
 Data encoding. Encodes data (base64) in given buffer bufSource and returns result in std::string.
static int decode (CBuffer &bufDest, const CBuffer &bufSource) throw (CException)
 Data decoding. Decodes base64 encoded buffer bufSource into buffer bufDest. Throws CException in case of error.
static int decode (CBuffer &bufDest, const std::string &strSource) throw (CException)
 Data decoding. Decodes base64 encoded string strSource into buffer bufDest. Throws CException in case of error.


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

static int sptk::CBase64::decode ( CBuffer bufDest,
const std::string &  strSource 
) throw (CException) [static]

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

Parameters:
bufDest CBuffer, destination buffer
strSource const std::string &, source string that holds base64 decoded data
Returns:
length of the returned string

static int sptk::CBase64::decode ( CBuffer bufDest,
const CBuffer bufSource 
) throw (CException) [static]

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

Parameters:
bufDest CBuffer destination buffer
bufSource CBuffer source buffer that holds base64 decoded data
Returns:
length of returned buffer

static void sptk::CBase64::encode ( std::string &  strDest,
const CBuffer bufSource 
) [static]

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

Parameters:
strDest std::string Destination string
bufSource CBuffer& Source buffer

static void sptk::CBase64::encode ( CBuffer bufDest,
const CBuffer bufSource 
) [static]

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

Parameters:
bufDest CBuffer Destination buffer
bufSource CBuffer Source buffer


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

Mon Mar 5 11:55:46 2012: SPTK 3.5.7