GSmtp::Base64 Class Reference

A base64 codec class. More...

#include <gbase64.h>

List of all members.

Static Public Member Functions

static std::string encode (const std::string &s, const std::string &line_break)
 Encodes the given string.
static std::string encode (const std::string &s)
 Encodes the given string.
static std::string decode (const std::string &)
 Decodes the given string.
static bool valid (const std::string &)
 Returns true if the string can be decoded.


Detailed Description

A base64 codec class.

See also:
RFC 1341 section 5.2

Definition at line 39 of file gbase64.h.


Member Function Documentation

std::string GSmtp::Base64::encode ( const std::string &  s,
const std::string &  line_break 
) [static]

Encodes the given string.

Definition at line 69 of file gbase64.cpp.

Referenced by encode().

std::string GSmtp::Base64::encode ( const std::string &  s  )  [static]

Encodes the given string.

Uses carriage-return-line-feed as the line-break string.

Definition at line 64 of file gbase64.cpp.

References encode().

std::string GSmtp::Base64::decode ( const std::string &  s  )  [static]

Decodes the given string.

Throws an exception if not a valid encoding.

Definition at line 129 of file gbase64.cpp.

Referenced by valid().

bool GSmtp::Base64::valid ( const std::string &  s  )  [static]

Returns true if the string can be decoded.

Definition at line 164 of file gbase64.cpp.

References decode().


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

Generated on Fri Apr 18 15:56:13 2008 for E-MailRelay by  doxygen 1.5.5