glibmm: Glib::Base64 Namespace Reference

Functions

std::string encode (const std::string& source, bool break_lines=false)
 Encode the given string in base64 encoding. More...

 
std::string decode (const std::string& source)
 Decode the given base64 encoded string. More...

 

Function Documentation

std::string Glib::Base64::decode ( const std::string source)

Decode the given base64 encoded string.

Parameters
sourceA string to decode.
Returns
The resulting decode string
std::string Glib::Base64::encode ( const std::string source,
bool  break_lines = false 
)

Encode the given string in base64 encoding.

You can pass true as the break_lines parameter to enable line breaking, that is usually used in mail systems. The new line character will appear for every 72 bytes.

Parameters
sourceA string to encode.
break_linesEnables/disables line breaking.
Returns
The string encoded in Base-64.