E-MailRelay

- Main Page
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

Static Public Member Functions | List of all members
G::Base64 Class Reference

A base64 codec class. More...

`#include <gbase64.h>`

## 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 &)
| Encodes the given string. More...
static std::string | decode (const std::string &, bool strict=false)
| Decodes the given string. More...
static bool | valid (const std::string &)
| Returns true if the string can be decoded without any strict errors. More...

## Detailed Description

A base64 codec class.

See also
  RFC-1341 section 5.2

Definition at line 37 of file gbase64.h.

## Member Function Documentation

std::string G::Base64::decode | ( | const std::string & | s,
|  | bool | strict = `false`
| ) |  |
| static

Decodes the given string.

Throws an exception if strict and not a valid encoding.

Definition at line 57 of file gbase64.cpp.

std::string G::Base64::encode | ( | const std::string & | s_in | ) |
| static

Encodes the given string.

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

Definition at line 47 of file gbase64.cpp.

bool G::Base64::valid | ( | const std::string & | s | ) |
| static

Returns true if the string can be decoded without any strict errors.

An empty string is valid.

Definition at line 66 of file gbase64.cpp.

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

- /tmp/slackrepo/SBo/slackrepo.S3SYfd/build_emailrelay/emailrelay-2.0.1/src/glib/gbase64.h
- /tmp/slackrepo/SBo/slackrepo.S3SYfd/build_emailrelay/emailrelay-2.0.1/src/glib/gbase64.cpp