Encodes and decodes byte streams using base64.
More...
#include <base64.hpp>
|
static void | encode (std::string_view src, char *dst) |
| Encodes a byte stream.
|
|
static char * | decode (std::string_view src, char *dst) |
| Decodes a byte stream.
|
|
static void | encode (std::string_view src, char *dst) |
| Encodes a byte stream.
|
|
static char * | decode (std::string_view src, char *dst) |
| Decodes a byte stream.
|
|
|
static constexpr auto | lut |
| Look-up table for encoding, maps input 6-bit values to output characters.
|
|
static constexpr auto | rlut = gen_rlut(lut) |
| Reverse look-up table for encoding, maps every possible character value to a byte or zero.
|
|
Encodes and decodes byte streams using base64.
◆ decode() [1/2]
char * Base64::decode |
( |
std::string_view | src, |
|
|
char * | dst ) |
|
static |
Decodes a byte stream.
- Parameters
-
src | The underlying string must be a multiple of 4 in length. |
dst | Must be at least output_size<3, 4>(src.size()) in length. |
◆ decode() [2/2]
static char * Base64::decode |
( |
std::string_view | src, |
|
|
char * | dst ) |
|
static |
Decodes a byte stream.
- Parameters
-
src | The underlying string must be a multiple of 4 in length. |
dst | Must be at least output_size<3, 4>(src.size()) in length. |
◆ encode() [1/2]
void Base64::encode |
( |
std::string_view | src, |
|
|
char * | dst ) |
|
static |
Encodes a byte stream.
- Parameters
-
src | The underlying string must be a multiple of 3 in length, extra bytes beyond src.size() must be zero. |
dst | Must be at least output_size<4, 3>(src.size()) in length. |
◆ encode() [2/2]
static void Base64::encode |
( |
std::string_view | src, |
|
|
char * | dst ) |
|
static |
Encodes a byte stream.
- Parameters
-
src | The underlying string must be a multiple of 3 in length, extra bytes beyond src.size() must be zero. |
dst | Must be at least output_size<4, 3>(src.size()) in length. |
◆ lut
static constexpr auto Base64::lut |
|
staticconstexprprivate |
Initial value:=
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"sv
Look-up table for encoding, maps input 6-bit values to output characters.
◆ rlut
Reverse look-up table for encoding, maps every possible character value to a byte or zero.
The documentation for this class was generated from the following files: