glibmm 2.62.0

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Examples

- Namespace List
- Namespace Members

Functions
Glib::Base64 Namespace Reference
Base64 routines

## 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

  source | A 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

  source | A string to encode.
  break_lines | Enables/disables line breaking.

Returns
  The string encoded in Base-64.