gbuffer_base64_to_string()

gbuffer_base64_to_string()#

gbuffer_base64_to_string() decodes a Base64-encoded string into a newly allocated gbuffer_t *.

Prototype

gbuffer_t *gbuffer_base64_to_string(
    const char *base64,
    size_t      base64_len
);

Parameters

Key

Type

Description

base64

const char *

Pointer to the Base64-encoded input string.

base64_len

size_t

Length of the Base64-encoded input string.


Return Value

Returns a newly allocated gbuffer_t * containing the decoded data, or NULL if decoding fails.

Notes

The returned gbuffer_t * must be freed using gbuffer_decref() to avoid memory leaks.

Prototype

// Not applicable in JS

Prototype

# Not applicable in Python
Examples
// TODO C examples
// TODO JS examples
# TODO Python examples