NDEVR
API Documentation
Base64Encoder

Functions for converting to and from Base64 https://en.wikipedia.org/wiki/Base64. More...

Static Public Member Functions

static void AppendBase64To (String &s, const uint01 *buf, uint04 size)
 Appends Base64-encoded data from a raw byte buffer to an existing string.
static Buffer< uint01DecodeFromBase64 (StringView encoded_string)
 Decodes a Base64-encoded string back into its original raw bytes.
static String EncodeToBase64 (const uint01 *buf, uint04 size)
 Encodes a raw byte buffer into a Base64-encoded string.
static String EncodeToBase64 (File file)
 Encodes the contents of a file into a Base64-encoded string.
static uint04 pos_of_char (const uint01 chr)
 Looks up the position index of a character within the Base64 alphabet.

Detailed Description

Functions for converting to and from Base64 https://en.wikipedia.org/wiki/Base64.


Definition at line 14 of file Base64Encoder.h.

Member Function Documentation

◆ AppendBase64To()

void Base64Encoder::AppendBase64To ( String & s,
const uint01 * buf,
uint04 size )
static

Appends Base64-encoded data from a raw byte buffer to an existing string.

Parameters
[in]sThe string to append the encoded data to.
[in]bufPointer to the byte buffer to encode.
[in]sizeThe number of bytes in the buffer.

◆ DecodeFromBase64()

Buffer< uint01 > Base64Encoder::DecodeFromBase64 ( StringView encoded_string)
static

Decodes a Base64-encoded string back into its original raw bytes.

Parameters
[in]encoded_stringThe Base64-encoded string to decode.
Returns
A buffer containing the decoded bytes.

◆ EncodeToBase64() [1/2]

String Base64Encoder::EncodeToBase64 ( const uint01 * buf,
uint04 size )
static

Encodes a raw byte buffer into a Base64-encoded string.

Parameters
[in]bufPointer to the byte buffer to encode.
[in]sizeThe number of bytes in the buffer.
Returns
A Base64-encoded string representing the buffer contents.

◆ EncodeToBase64() [2/2]

String Base64Encoder::EncodeToBase64 ( File file)
static

Encodes the contents of a file into a Base64-encoded string.

Parameters
[in]fileThe file whose contents will be encoded.
Returns
A Base64-encoded string representing the file contents.

◆ pos_of_char()

uint04 Base64Encoder::pos_of_char ( const uint01 chr)
static

Looks up the position index of a character within the Base64 alphabet.

Parameters
[in]chrThe character to look up.
Returns
The zero-based index of the character in the Base64 alphabet.

The documentation for this class was generated from the following file: