API for encoding and decoding Base64 strings.
◆ b64Validate()
bool Common::b64Validate |
( |
String & |
string | ) |
|
Validates a string to see if its a properly Base64 encoded string. This gets called when using the decode functions.
- Parameters
-
[in] | string | the string to validate |
- Returns
- true on success, false if an error occurred.
◆ b64EncodeString()
Encodes a string into a Base64 encoded string.
- Parameters
-
[in] | string | the string to encode |
- Returns
- String containing the Base64 encoded string.
◆ b64EncodeStream()
Encodes a ReadStream into a Base64 encoded string.
- Parameters
-
[in] | stream | the stream to encode |
- Returns
- String containing the Base64 encoded string.
◆ b64EncodeData()
String Common::b64EncodeData |
( |
void * |
dataPtr, |
|
|
size_t |
dataSize |
|
) |
| |
Encodes a data pointer into a Base64 encoded string.
- Parameters
-
[in] | dataPtr | pointer to data to encode |
- Returns
- String containing the Base64 encoded string.
◆ b64DecodeString()
Decodes a Base64 encoded string into a regular string.
- Parameters
-
[in] | string | base64 encoded string to decode |
- Returns
- String containing the decoded result, empty string if an error occurred.
◆ b64DecodeStream()
Decodes a Base64 encoded string into a MemoryReadStream, its contents will be disposed when deleting the stream.
- Parameters
-
[in] | string | base64 encoded string to decode |
- Returns
- MemoryReadStream pointer containing the decoded result, nullptr if an error occurred
◆ b64DecodeData()
bool Common::b64DecodeData |
( |
String & |
string, |
|
|
void * |
dataPtr |
|
) |
| |
Decodes a Base64 encoded string into the set data pointer
- Parameters
-
[in] | string | base64 encoded string to decode |
- Returns
- true on success, false if an error occurred