glibmm 2.56.0

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

## ◆ decode()

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

## ◆ encode()

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.