Function

GLibbase64_encode

Declaration

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

Description

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

Available since:2.12

Parameters

data 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 gsize
 

The length of data.

Return value

Returns: utf8
 

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 string is a NUL terminated UTF-8 string.