5#include "flutter/fml/base32.h"
13static constexpr char kEncoding[] =
"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567";
25 const size_t encoded_length = (input.size() * 8 + 4) / 5;
26 output.reserve(encoded_length);
29 converter.Append(
static_cast<uint8_t
>(input[0]));
30 size_t next_byte_index = 1;
34 if (
converter.CanAppend() && next_byte_index < input.size()) {
35 converter.Append(
static_cast<uint8_t
>(input[next_byte_index++]));
48 26, 27, 28, 29, 30, 31, -1, -1, -1, -1, -1, -1, -1, -1,
49 -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12,
50 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25};
55std::pair<bool, std::string>
Base32Decode(
const std::string& input) {
58 for (
char c : input) {
59 int map_index = c -
'2';
static float max(float r, float g, float b)
static constexpr int kDecodeMapSize
static constexpr signed char kDecodeMap[]
std::pair< bool, std::string > Base32Decode(const std::string &input)
static constexpr char kEncoding[]
std::pair< bool, std::string > Base32Encode(std::string_view input)