|
template<class T > |
static void | base64_encode (const std::vector< T > &, std::string &) noexcept |
| Convert from binary to base64 string. More...
|
|
static std::string | str_to_base64 (const std::string &s) noexcept |
| Convert from string to base64 string. More...
|
|
template<class T > |
static bool | base64_decode (const std::string &, std::vector< T > &) noexcept |
| Convert from base64 string to binary. More...
|
|
static std::string | base64_to_str (const std::string &) noexcept |
| Convert from base64 string to string. More...
|
|
static std::string | base64_to_base64url (const std::string &) noexcept |
| Convert from base64 to base64url. More...
|
|
static std::string | base64url_to_base64 (const std::string &) noexcept |
| Convert from base64url to base64.
|
|
◆ base64_decode()
template<class T >
template bool Base64::base64_decode< unsigned char > |
( |
const std::string & |
, |
|
|
std::vector< T > & |
|
|
) |
| |
|
staticnoexcept |
Convert from base64 string to binary.
- Parameters
-
s | input base 64 string |
v | output binary data |
- Return values
-
true | if conversion successful |
false | if conversion failed due to invalid input format |
Definition at line 117 of file base64.cc.
◆ base64_encode()
template<class T >
template void Base64::base64_encode< unsigned char > |
( |
const std::vector< T > & |
, |
|
|
std::string & |
|
|
) |
| |
|
staticnoexcept |
◆ base64_to_base64url()
std::string Base64::base64_to_base64url |
( |
const std::string & |
b | ) |
|
|
staticnoexcept |
Convert from base64 to base64url.
See https://tools.ietf.org/html/rfc4648
base64url replaces, '+' with '-', '/' with '_', and removes any padding '=' characters.
It is also known as "Base 64 with URL and Filename Safe Encoding".
Definition at line 178 of file base64.cc.
◆ base64_to_str()
std::string Base64::base64_to_str |
( |
const std::string & |
s | ) |
|
|
staticnoexcept |
Convert from base64 string to string.
- Parameters
-
- Return values
-
base64_string | if conversion succeeded |
empty_string | if conversion failed |
Definition at line 168 of file base64.cc.
◆ str_to_base64()
std::string Base64::str_to_base64 |
( |
const std::string & |
s | ) |
|
|
staticnoexcept |
Convert from string to base64 string.
- Parameters
-
- Return values
-
base64_string | base64 encoded string |
Definition at line 108 of file base64.cc.
The documentation for this class was generated from the following files: