#include <base64.hpp>
|
| OPENVPN_SIMPLE_EXCEPTION (base64_decode_out_of_bound_error) |
|
| OPENVPN_SIMPLE_EXCEPTION (base64_bad_map) |
|
| OPENVPN_SIMPLE_EXCEPTION (base64_decode_error) |
|
| Base64 (const char *altmap=nullptr) |
|
template<typename V > |
std::string | encode (const V &data) const |
|
std::string | encode (const void *data, size_t size) const |
|
size_t | decode (void *data, size_t len, const std::string &str) const |
|
std::string | decode (const std::string &str) const |
|
template<typename V > |
void | decode (V &dest, const std::string &str) const |
|
template<typename V > |
bool | is_base64 (const V &data, const size_t expected_decoded_length) const |
|
|
static size_t | encoded_len (const size_t decoded_len) |
|
static size_t | num_eq (const size_t decoded_len) |
|
|
unsigned char | enc [64] |
|
unsigned char | dec [128] |
|
unsigned char | equal |
|
Definition at line 27 of file base64.hpp.
◆ Base64()
openvpn::Base64::Base64 |
( |
const char * |
altmap = nullptr | ) |
|
|
inline |
◆ decode() [1/3]
std::string openvpn::Base64::decode |
( |
const std::string & |
str | ) |
const |
|
inline |
◆ decode() [2/3]
template<typename V >
void openvpn::Base64::decode |
( |
V & |
dest, |
|
|
const std::string & |
str |
|
) |
| const |
|
inline |
◆ decode() [3/3]
size_t openvpn::Base64::decode |
( |
void * |
data, |
|
|
size_t |
len, |
|
|
const std::string & |
str |
|
) |
| const |
|
inline |
Decodes data from the passed string and stores the result in data
- Parameters
-
data | Destination of the decoded data |
len | Length of the region in data |
str | Base64 string to decode |
- Returns
- Number of bytes written to data
Definition at line 186 of file base64.hpp.
◆ decode_base64_char()
unsigned int openvpn::Base64::decode_base64_char |
( |
const char |
c | ) |
const |
|
inlineprivate |
◆ decode_size_max()
static size_t openvpn::Base64::decode_size_max |
( |
const size_t |
encode_size | ) |
|
|
inlinestatic |
◆ encode() [1/2]
template<typename V >
std::string openvpn::Base64::encode |
( |
const V & |
data | ) |
const |
|
inline |
◆ encode() [2/2]
std::string openvpn::Base64::encode |
( |
const void * |
data, |
|
|
size_t |
size |
|
) |
| const |
|
inline |
◆ encode_size_max()
static size_t openvpn::Base64::encode_size_max |
( |
const size_t |
decode_size | ) |
|
|
inlinestatic |
◆ encoded_len()
static size_t openvpn::Base64::encoded_len |
( |
const size_t |
decoded_len | ) |
|
|
inlinestaticprivate |
◆ is_base64()
template<typename V >
bool openvpn::Base64::is_base64 |
( |
const V & |
data, |
|
|
const size_t |
expected_decoded_length |
|
) |
| const |
|
inline |
◆ is_base64_char()
bool openvpn::Base64::is_base64_char |
( |
const char |
c | ) |
const |
|
inlineprivate |
◆ num_eq()
static size_t openvpn::Base64::num_eq |
( |
const size_t |
decoded_len | ) |
|
|
inlinestaticprivate |
◆ OPENVPN_SIMPLE_EXCEPTION() [1/3]
openvpn::Base64::OPENVPN_SIMPLE_EXCEPTION |
( |
base64_bad_map |
| ) |
|
◆ OPENVPN_SIMPLE_EXCEPTION() [2/3]
openvpn::Base64::OPENVPN_SIMPLE_EXCEPTION |
( |
base64_decode_error |
| ) |
|
◆ OPENVPN_SIMPLE_EXCEPTION() [3/3]
openvpn::Base64::OPENVPN_SIMPLE_EXCEPTION |
( |
base64_decode_out_of_bound_error |
| ) |
|
◆ token_decode()
unsigned int openvpn::Base64::token_decode |
( |
const char * |
token, |
|
|
const ptrdiff_t |
len, |
|
|
unsigned int & |
marker |
|
) |
| const |
|
inlineprivate |
◆ dec
unsigned char openvpn::Base64::dec[128] |
|
private |
◆ enc
unsigned char openvpn::Base64::enc[64] |
|
private |
◆ equal
unsigned char openvpn::Base64::equal |
|
private |
The documentation for this class was generated from the following file: