NetBase64_Encode

Encode a buffer to the Base64 standard.

Files

net_base64.h/net_base64.c

Prototype

void  NetBase64_Encode (CPU_CHAR     *p_buf_in,
                        CPU_INT16U    buf_in_len,
                        CPU_CHAR     *p_buf_out,
                        CPU_INT16U    buf_out_len,
                        NET_ERR      *p_err)

Arguments

p_buf_in

Pointer to buffer holding data to encode.

buf_in_len

Length of data in buffer input.

p_buf_out

Pointer to the specific protocol address.

addr_protocol_len

Length of protocol address (in bytes).

p_err

Pointer to variable that will receive the error code from this function:

NET_ERR_NONE
NET_ERR_FAULT_NULL_PTR
NET_UTIL_ERR_BUF_TOO_SMALL
NET_UTIL_ERR_NULL_SIZE

Returned Value

None.

Required Configuration

None.

Notes / Warnings

From RFC #4648, Section 4 'Base 64 Encoding' "The encoding process represents 24-bit groups of input bits as output strings of 4 encoded characters. Each of [these encoded characters] is translated into a single character in the base 64 alphabet".