Base module
base64
Base64 encoding and decoding helpers.
Classes
Functions
| Return | Name | Description |
|---|---|---|
size_t | encodedBufferCapacity inline | Returns a safe temporary buffer size for encoding up to inputSize bytes. Includes padding/newline slack so callers can reuse the same buffer for finalize(). |
std::string | encode inline | Encodes an STL byte container to a Base64 string. |
std::string | decode inline | Decodes a Base64-encoded STL container to a binary string. |
encodedBufferCapacity
inline
inline size_t encodedBufferCapacity(size_t inputSize, int lineLength = LINE_LENGTH)Defined in src/base/include/icy/base64.h:89
Returns a safe temporary buffer size for encoding up to inputSize bytes. Includes padding/newline slack so callers can reuse the same buffer for finalize().
encode
inline
template<typename T> inline std::string encode(const T & bytes, int lineLength = LINE_LENGTH)Defined in src/base/include/icy/base64.h:189
Encodes an STL byte container to a Base64 string.
Returns
Base64-encoded string.
Parameters
| Parameter | Type | Description |
|---|---|---|
bytes | const T & | Input data container. |
lineLength | int | Characters per line in the output (0 disables wrapping). |
decode
inline
template<typename T> inline std::string decode(const T & bytes)Defined in src/base/include/icy/base64.h:314
Decodes a Base64-encoded STL container to a binary string.
Returns
Decoded binary string.
Parameters
| Parameter | Type | Description |
|---|---|---|
bytes | const T & | Input Base64 data container. |
Variables
| Return | Name | Description |
|---|---|---|
constexpr int | BUFFER_SIZE constexpr | |
constexpr int | LINE_LENGTH constexpr |
BUFFER_SIZE
constexpr
constexpr int BUFFER_SIZE = 16384Defined in src/base/include/icy/base64.h:31
LINE_LENGTH
constexpr
constexpr int LINE_LENGTH = 72