0 if successful, or MBEDTLS_ERR_BASE64_BUFFER_TOO_SMALL. *olen is always updated to reflect the amount of data that has (or would have) been written. If that length cannot be represented, then no data is written to the buffer and *olen is set to the maximum length representable as a size_t.
Notes
Call this function with dlen = 0 to obtain the required buffer size in *olen
Examples
mbedtls_base64_encode() is referenced by 2 libraries and example projects: