40 G_EXCEPTION( Error ,
"base64 encoding error" ) ;
42 static std::string
encode(
const std::string & s ,
const std::string & line_break = std::string() ) ;
46 static std::string
decode(
const std::string & ,
bool throw_on_invalid =
false ,
bool strict =
true ) ;
50 static bool valid(
const std::string & ,
bool strict =
true ) ;
static std::string decode(const std::string &, bool throw_on_invalid=false, bool strict=true)
Decodes the given string.
static std::string encode(const std::string &s, const std::string &line_break=std::string())
Encodes the given string, optionally inserting line-breaks to limit the line length.
static bool valid(const std::string &, bool strict=true)
Returns true if the string is a valid base64 encoding, possibly allowing for embedded newlines,...