MySQL 9.0.0
Source Code Documentation
Base64Base< Alphabet, E, PaddingMandatory, PaddingChar > Class Template Reference

Base64 codec base class. More...

#include <base64.h>

Static Public Member Functions

static std::vector< uint8_t > decode (const std::string &encoded)
 decode a base64 encoded string to binary. More...
 
static std::string encode (const std::vector< uint8_t > &decoded)
 encode binary to base64. More...
 
static std::string encode (const std::string_view &decoded)
 

Detailed Description

template<class Alphabet, Base64Endianess E, bool PaddingMandatory, char PaddingChar>
class Base64Base< Alphabet, E, PaddingMandatory, PaddingChar >

Base64 codec base class.

Member Function Documentation

◆ decode()

template<class Alphabet , Base64Endianess E, bool PaddingMandatory, char PaddingChar>
static std::vector< uint8_t > Base64Base< Alphabet, E, PaddingMandatory, PaddingChar >::decode ( const std::string &  encoded)
inlinestatic

decode a base64 encoded string to binary.

Precondition
encoded only contains alphabet
Exceptions
std::runtime_errorif preconditions are not met
Returns
binary representation

◆ encode() [1/2]

template<class Alphabet , Base64Endianess E, bool PaddingMandatory, char PaddingChar>
static std::string Base64Base< Alphabet, E, PaddingMandatory, PaddingChar >::encode ( const std::string_view &  decoded)
inlinestatic

◆ encode() [2/2]

template<class Alphabet , Base64Endianess E, bool PaddingMandatory, char PaddingChar>
static std::string Base64Base< Alphabet, E, PaddingMandatory, PaddingChar >::encode ( const std::vector< uint8_t > &  decoded)
inlinestatic

encode binary to base64.


The documentation for this class was generated from the following file: