E-MailRelay

Namespaces | Typedefs | Functions
gbase64.cpp File Reference
`#include "gdef.h"`
`#include "gbase64.h"`
`#include "gstringview.h"`
`#include "gstr.h"`
`#include <algorithm>`
`#include <iterator>`

Go to the source code of this file.

## Namespaces
namespace | G
| Low-level classes.

## Typedefs
using | G::Base64Imp::uint32_type = g_uint32_t
using | G::Base64Imp::string_in = string_view
using | G::Base64Imp::iterator_in = string_view::const_iterator
using | G::Base64Imp::iterator_out = std::back_insert_iterator< std::string >

## Functions
std::string | G::Base64Imp::encode (string_in, string_in eol)
std::string | G::Base64Imp::decode (string_in, bool do_throw, bool strict)
bool | G::Base64Imp::valid (string_in, bool strict)
void | G::Base64Imp::encode_imp (iterator_out, string_in, string_in, std::size_t)
void | G::Base64Imp::decode_imp (iterator_out, string_in s, bool &error)
void | G::Base64Imp::generate_6 (uint32_type &n, int &i, iterator_out &)
void | G::Base64Imp::accumulate_8 (uint32_type &n, iterator_in &, iterator_in, int &)
void | G::Base64Imp::accumulate_6 (g_uint32_t &n, iterator_in &, iterator_in, std::size_t &, bool &error)
void | G::Base64Imp::generate_8 (g_uint32_t &n, std::size_t &i, iterator_out &, bool &error)
std::size_t | G::Base64Imp::index (char c, bool &error) noexcept
bool | G::Base64Imp::strictlyValid (string_view) noexcept
constexpr char | G::Base64Imp::to_char (g_uint32_t n) noexcept
constexpr g_uint32_t | G::Base64Imp::numeric (char c) noexcept
constexpr std::size_t | G::Base64Imp::hi_6 (g_uint32_t n) noexcept
constexpr g_uint32_t | G::Base64Imp::hi_8 (g_uint32_t n) noexcept

## Typedef Documentation

## ◆ iterator_in

using G::Base64Imp::iterator_in = typedef string_view::const_iterator

Definition at line 47 of file gbase64.cpp.

## ◆ iterator_out

using G::Base64Imp::iterator_out = typedef std::back_insert_iterator<std::string>

Definition at line 48 of file gbase64.cpp.

## ◆ string_in

using G::Base64Imp::string_in = typedef string_view

Definition at line 46 of file gbase64.cpp.

## ◆ uint32_type

using G::Base64Imp::uint32_type = typedef g_uint32_t

Definition at line 35 of file gbase64.cpp.

## Function Documentation

## ◆ accumulate_6()

void G::Base64Imp::accumulate_6 | ( | g_uint32_t & | n,
|  | iterator_in & | p,
|  | iterator_in | end,
|  | std::size_t & | bits,
|  | bool & | error
| ) |  |

Definition at line 229 of file gbase64.cpp.

## ◆ accumulate_8()

void G::Base64Imp::accumulate_8 | ( | uint32_type & | n,
|  | iterator_in & | p,
|  | iterator_in | end,
|  | int & | i
| ) |  |

Definition at line 209 of file gbase64.cpp.

## ◆ decode()

std::string G::Base64Imp::decode | ( | string_in | input,
|  | bool | do_throw,
|  | bool | strict
| ) |  |

Definition at line 130 of file gbase64.cpp.

## ◆ decode_imp()

void G::Base64Imp::decode_imp | ( | iterator_out | result_p,
|  | string_in | s,
|  | bool & | error
| ) |  |

Definition at line 148 of file gbase64.cpp.

## ◆ encode()

std::string G::Base64Imp::encode | ( | string_in | input,
|  | string_in | eol
| ) |  |

Definition at line 101 of file gbase64.cpp.

## ◆ encode_imp()

void G::Base64Imp::encode_imp | ( | iterator_out | result_p,
|  | string_in | input,
|  | string_in | eol,
|  | std::size_t | blocks_per_line
| ) |  |

Definition at line 109 of file gbase64.cpp.

## ◆ generate_6()

void G::Base64Imp::generate_6 | ( | uint32_type & | n,
|  | int & | i,
|  | iterator_out & | result
| ) |  |

Definition at line 221 of file gbase64.cpp.

## ◆ generate_8()

void G::Base64Imp::generate_8 | ( | g_uint32_t & | n,
|  | std::size_t & | i,
|  | iterator_out & | result,
|  | bool & | error
| ) |  |

Definition at line 247 of file gbase64.cpp.

## ◆ hi_6()

constexpr std::size_t G::Base64Imp::hi_6 | ( | g_uint32_t | n | ) |
| constexpr noexcept

Definition at line 71 of file gbase64.cpp.

## ◆ hi_8()

constexpr g_uint32_t G::Base64Imp::hi_8 | ( | g_uint32_t | n | ) |
| constexpr noexcept

Definition at line 75 of file gbase64.cpp.

## ◆ index()

std::size_t G::Base64Imp::index | ( | char | c,
|  | bool & | error
| ) |  |
| noexcept

Definition at line 261 of file gbase64.cpp.

## ◆ numeric()

constexpr g_uint32_t G::Base64Imp::numeric | ( | char | c | ) |
| constexpr noexcept

Definition at line 67 of file gbase64.cpp.

## ◆ strictlyValid()

bool G::Base64Imp::strictlyValid | ( | string_view | s | ) |
| noexcept

Definition at line 185 of file gbase64.cpp.

## ◆ to_char()

constexpr char G::Base64Imp::to_char | ( | g_uint32_t | n | ) |
| constexpr noexcept

Definition at line 63 of file gbase64.cpp.

## ◆ valid()

bool G::Base64Imp::valid | ( | string_in | input,
|  | bool | strict
| ) |  |

Definition at line 173 of file gbase64.cpp.