chromium/content/browser/webauth/client_data_json.cc

// Copyright 2021 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/342213636): Remove this and spanify to fix the errors.
#pragma allow_unsafe_buffers
#endif

#include "content/browser/webauth/client_data_json.h"

#include <string_view>

#include "base/base64url.h"
#include "base/check.h"
#include "base/rand_util.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/utf_string_conversion_utils.h"
#include "content/public/common/content_features.h"

namespace content {
namespace {

std::string Base64UrlEncode(const base::span<const uint8_t> input) {}

// ToJSONString encodes |in| as a JSON string, using the specific escaping rules
// required by https://github.com/w3c/webauthn/pull/1375.
std::string ToJSONString(std::string_view in) {}

}  // namespace

ClientDataJsonParams::ClientDataJsonParams(ClientDataRequestType type,
                                           url::Origin origin,
                                           url::Origin top_origin,
                                           std::vector<uint8_t> challenge,
                                           bool is_cross_origin_iframe)
    :{}
ClientDataJsonParams::ClientDataJsonParams(ClientDataJsonParams&&) = default;
ClientDataJsonParams& ClientDataJsonParams::operator=(ClientDataJsonParams&&) =
    default;
ClientDataJsonParams::~ClientDataJsonParams() = default;

std::string BuildClientDataJson(ClientDataJsonParams params) {}

}  // namespace content