PebbleOS
Loading...
Searching...
No Matches
Functions

Base64 encoding. More...

Functions

size_t pbl_base64_encode (char *out, size_t out_len, const void *data, size_t data_len)
 Encode data as standard (RFC 4648) padded base64.
 

Detailed Description

Base64 encoding.

Function Documentation

◆ pbl_base64_encode()

size_t pbl_base64_encode ( char *  out,
size_t  out_len,
const void *  data,
size_t  data_len 
)

Encode data as standard (RFC 4648) padded base64.

Calling it with a too small out (e.g. out_len 0) returns the required length without writing anything.

Parameters
[out]outOutput buffer. Written only if it can hold the whole encoding; NUL-terminated when there is room left for the terminator.
out_lenSize of out in bytes.
dataData to encode.
data_lenNumber of bytes to encode.
Returns
Length of the encoding, excluding the NUL terminator.