E-MailRelay
|
A base64 codec class. More...
#include <gbase64.h>
Static Public Member Functions | |
static std::string | encode (std::string_view, std::string_view line_break={}) |
Encodes the given string, optionally inserting line-breaks to limit the line length. More... | |
static std::string | decode (std::string_view, bool throw_on_invalid=false, bool strict=true) |
Decodes the given string. More... | |
static bool | valid (std::string_view, bool strict=true) |
Returns true if the string is a valid base64 encoding, possibly allowing for embedded newlines, carriage returns, and space characters. More... | |
|
static |
Decodes the given string.
Either throws an exception if not a valid() encoding, or returns the empty string.
Definition at line 84 of file gbase64.cpp.
|
static |
Encodes the given string, optionally inserting line-breaks to limit the line length.
Definition at line 79 of file gbase64.cpp.
|
static |
Returns true if the string is a valid base64 encoding, possibly allowing for embedded newlines, carriage returns, and space characters.
Strict checking permits one or two pad characters at the end to make a multiple of four characters in total, but no newlines, carriage returns or other odd characters. Empty strings are valid; single character strings are not.
Definition at line 89 of file gbase64.cpp.