Kea 2.7.6
|
Class for encoding and decoding binary data using Base64 as described in RFC 4648. More...
#include <encode.h>
Public Member Functions | |
Base64Encoder () | |
Constructor. | |
~Base64Encoder ()=default | |
Destructor. | |
Public Member Functions inherited from isc::util::encode::BaseNEncoder | |
BaseNEncoder (const std::string &algorithm, const char *digit_set, const std::vector< uint8_t > &bits_table, size_t bits_per_digit, size_t digits_per_group, const char pad_char, size_t max_pad, bool case_sensitive) | |
Constructor. | |
virtual | ~BaseNEncoder ()=default |
Destructor. | |
char | bitsToDigit (uint8_t bits) |
Translate a byte of binary data into the appropriate algorithm digit. | |
void | decode (const std::string &encoded_str, std::vector< uint8_t > &output) |
Decodes an encoded string using the encoder's algorithm. | |
uint8_t | digitToBits (uint8_t digit) |
Translate a digit into the appropriate algorithm bit value. | |
std::string | encode (const std::vector< uint8_t > &input) |
Encodes binary data using the encoder's algorithm. | |
std::string | getAlgorithm () const |
Get the algorithm name. | |
size_t | getBitsPerDigit () |
Get the number of data bits represented by a digit. | |
const std::vector< uint8_t > & | getBitsTable () const |
Get the digit lookup table. | |
const char * | getDigitSet () const |
Get the digit set. | |
size_t | getDigitsPerGroup () const |
Get the number of digits contained in a group. | |
size_t | getMaxBitsToDigit () |
Get the maximum index value of the digit set. | |
size_t | getMaxDigitToBits () |
Get the maximum index value of the algorithm bit table. | |
size_t | getMaxPad () |
Get the maximum number of pad characters in a group. | |
uint8_t | getPadChar () const |
Get the character used for padding out to group size (0 means no padding) | |
bool | isCaseSensitive () |
Indicates whether or not the algorithm's digit set is case-sensitive. | |
Static Public Attributes | |
static const std::vector< uint8_t > | BITS_TABLE |
Table that maps Base64 digits to their binary data value. | |
static const char * | DIGIT_SET |
Set of digits used for encoding in Base64. | |
Additional Inherited Members | |
Protected Attributes inherited from isc::util::encode::BaseNEncoder | |
std::string | algorithm_ |
Name of the algorithm, used for logging. | |
size_t | bits_per_digit_ |
Number of data bits represented by a digit. | |
std::vector< uint8_t > | bits_table_ |
Table to translate digits to data used during decoding. | |
bool | case_sensitive_ |
Indicates whether or not the algorithm's digit set is case-sensitive. | |
const char * | digit_set_ |
Set of digits (i.e. alphabet) used for encoding. | |
size_t | digits_per_group_ |
Number of digits contained in a group. | |
size_t | max_bits_to_digit_ |
Maximum index value of the digit set. | |
size_t | max_digit_to_bits_ |
Maximum index value of the algorithm bit table. | |
size_t | max_pad_ |
Maximum number of pad characters in a group. | |
const char | pad_char_ |
Character used for padding out to group size (0 means no padding) | |
Class for encoding and decoding binary data using Base64 as described in RFC 4648.
|
inline |
|
default |
Destructor.
|
static |
Table that maps Base64 digits to their binary data value.
|
static |