Function

GLibbase64_encode

since: 2.12

Declaration [src]

gchar*
g_base64_encode (
  const guchar* data,
  gsize len
)

Description [src]

Encode a sequence of binary data into its Base-64 stringified representation.

Available since: 2.12

Parameters

data

Type: An array of guint8

The binary data to encode.

The argument can be NULL.
The length of the array is specified in the len argument.
The data is owned by the caller of the function.
len

Type: gsize

The length of data.

Return value

Type: gchar*

A newly allocated, zero-terminated Base-64 encoded string representing data. The returned string must be freed with g_free().

The caller of the function takes ownership of the data, and is responsible for freeing it.
The value is a NUL terminated UTF-8 string.