chromium/components/reporting/encryption/decryption.cc

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

#include "components/reporting/encryption/decryption.h"

#include <limits>
#include <memory>
#include <string>
#include <string_view>
#include <utility>

#include "base/containers/span.h"
#include "base/hash/hash.h"
#include "base/memory/ptr_util.h"
#include "base/rand_util.h"
#include "base/strings/strcat.h"
#include "base/strings/string_number_conversions.h"
#include "base/task/task_runner.h"
#include "base/task/thread_pool.h"
#include "base/types/expected.h"
#include "components/reporting/encryption/encryption.h"
#include "components/reporting/encryption/primitives.h"
#include "components/reporting/encryption/testing_primitives.h"
#include "components/reporting/util/status.h"
#include "components/reporting/util/statusor.h"

namespace reporting {
namespace test {

Decryptor::Handle::Handle(std::string_view shared_secret,
                          scoped_refptr<Decryptor> decryptor)
    :{}

Decryptor::Handle::~Handle() = default;

void Decryptor::Handle::AddToRecord(std::string_view data,
                                    base::OnceCallback<void(Status)> cb) {}

void Decryptor::Handle::CloseRecord(
    base::OnceCallback<void(StatusOr<std::string_view>)> cb) {}

void Decryptor::OpenRecord(std::string_view shared_secret,
                           base::OnceCallback<void(StatusOr<Handle*>)> cb) {}

StatusOr<std::string> Decryptor::DecryptSecret(
    std::string_view private_key,
    std::string_view peer_public_value) {}

Decryptor::Decryptor()
    :{}

Decryptor::~Decryptor() = default;

void Decryptor::RecordKeyPair(
    std::string_view private_key,
    std::string_view public_key,
    base::OnceCallback<void(StatusOr<Encryptor::PublicKeyId>)> cb) {}

void Decryptor::RetrieveMatchingPrivateKey(
    Encryptor::PublicKeyId public_key_id,
    base::OnceCallback<void(StatusOr<std::string>)> cb) {}

StatusOr<scoped_refptr<Decryptor>> Decryptor::Create() {}

}  // namespace test
}  // namespace reporting