Cross-platform C SDK logo

Cross-platform C SDK

Base64

❮ Back
Next ❯
This page has been automatically translated using the Google Translate API services. We are working on improving texts. Thank you for your understanding and patience.

Functions

uint32_tb64_encoded_size (...)
uint32_tb64_decoded_size (...)
uint32_tb64_encode (...)
uint32_tb64_decode (...)
❮ Back
Next ❯

b64_encoded_size ()

Get the number of bytes needed to encode a memory block in format base64.

uint32_t
b64_encoded_size(const uint32_t data_size);
data_size

The original block size.

Return

Base64 size.


b64_decoded_size ()

Get the number of bytes needed to decode a block of memory in base64 format.

uint32_t
b64_decoded_size(const uint32_t data_size);
data_size

The block size encoded in base64.

Return

The size in bytes.


b64_encode ()

Encode a block of memory in base64.

uint32_t
b64_encode(const byte_t *data,
           const uint32_t size,
           char_t *base64);
data

The data block.

size

Block size.

base64

The buffer where to store the result.

Return

The size in bytes.

Remarks

The buffer base64 must be at least the size returned by b64_encoded_size.


b64_decode ()

De-encode a block base64.

uint32_t
b64_decode(const char_t *base64,
           const uint32_t size,
           byte_t *data);
base64

The base64 block.

size

Block size.

data

The buffer where to store the result.

Return

The size in bytes.

Remarks

The buffer data must be at least the size returned by b64_decoded_size.

❮ Back
Next ❯