#include "base/base64url.h"
#include <stddef.h>
#include <string_view>
#include "base/base64.h"
#include "base/numerics/safe_math.h"
#include "base/strings/string_util.h"
#include "third_party/modp_b64/modp_b64.h"
namespace base {
namespace {
const char kPaddingChar = …;
const char kBase64Chars[] = …;
const char kBase64UrlSafeChars[] = …;
class StringViewOrString { … };
std::optional<StringViewOrString> Base64ToBase64URL(
std::string_view input,
Base64UrlDecodePolicy policy) { … }
}
void Base64UrlEncode(span<const uint8_t> input,
Base64UrlEncodePolicy policy,
std::string* output) { … }
void Base64UrlEncode(std::string_view input,
Base64UrlEncodePolicy policy,
std::string* output) { … }
bool Base64UrlDecode(std::string_view input,
Base64UrlDecodePolicy policy,
std::string* output) { … }
std::optional<std::vector<uint8_t>> Base64UrlDecode(
std::string_view input,
Base64UrlDecodePolicy policy) { … }
}