chromium/components/base32/base32.cc

// Copyright 2016 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifdef UNSAFE_BUFFERS_BUILD
// TODO(crbug.com/40285824): Remove this and convert code to safer constructs.
#pragma allow_unsafe_buffers
#endif

#include "components/base32/base32.h"

#include <stddef.h>

#include <limits>
#include <string_view>

#include "base/check_op.h"
#include "base/numerics/safe_math.h"

namespace base32 {

namespace {

constexpr char kEncoding[] =;
constexpr char kPaddingChar =;

// Returns a 5 bit number between [0,31] matching the provided base 32 encoded
// character. Returns 0xff on error.
uint8_t ReverseMapping(char input_char) {}

}  // namespace

std::string Base32Encode(base::span<const uint8_t> input,
                         Base32EncodePolicy policy) {}

std::vector<uint8_t> Base32Decode(std::string_view input) {}

}  // namespace base32