chttp · Section 3
chttp_base64_decode
NAME
chttp_base64_decode - decode a base64 string (default allocator)
LIBRARY
C Collections (libccollections, -lccollections)
SYNOPSIS
#include <ccollections/chttp.h> void *chttp_base64_decode(const char *b64_input, size_t *out_len);
DESCRIPTION
This is a static inline wrapper that calls chttp_base64_decode_mp() with NULL memory management procedures, so it allocates with malloc.
PARAMETERS
b64_input The NUL-terminated base64 string to decode. It must not
be NULL.
out_len Optional. It receives the number of decoded bytes. Pass
NULL if you don't need it.
RETURN VALUE
A new buffer with the decoded bytes on success. NULL if the allocation fails or the input is malformed.