gbuffer_string_to_base64()#
gbuffer_string_to_base64() encodes a given string into a Base64-encoded gbuffer_t object.
Prototype
gbuffer_t *gbuffer_string_to_base64(
const char *src,
size_t len
);
Parameters
Key |
Type |
Description |
|---|---|---|
|
|
Pointer to the input string to be encoded. |
|
|
Length of the input string. |
Return Value
Returns a newly allocated gbuffer_t * containing the Base64-encoded representation of the input string. Returns NULL on failure.
Notes
The returned gbuffer_t * must be freed using gbuffer_decref().
Prototype
// Not applicable in JS
Prototype
# Not applicable in Python
Examples
// TODO C examples
// TODO JS examples
# TODO Python examples