#include "quiche/oblivious_http/buffers/oblivious_http_response.h"
#include <stddef.h>
#include <stdint.h>
#include <algorithm>
#include <memory>
#include <string>
#include <utility>
#include "absl/status/status.h"
#include "absl/status/statusor.h"
#include "absl/strings/str_cat.h"
#include "absl/strings/string_view.h"
#include "openssl/aead.h"
#include "openssl/hkdf.h"
#include "openssl/hpke.h"
#include "quiche/common/platform/api/quiche_bug_tracker.h"
#include "quiche/common/quiche_crypto_logging.h"
#include "quiche/common/quiche_random.h"
#include "quiche/oblivious_http/common/oblivious_http_header_key_config.h"
namespace quiche {
namespace {
void random(QuicheRandom* quiche_random, char* dest, size_t len) { … }
}
ObliviousHttpResponse::ObliviousHttpResponse(std::string encrypted_data,
std::string resp_plaintext)
: … { … }
absl::StatusOr<ObliviousHttpResponse>
ObliviousHttpResponse::CreateClientObliviousResponse(
std::string encrypted_data,
ObliviousHttpRequest::Context& oblivious_http_request_context,
absl::string_view resp_label) { … }
absl::StatusOr<ObliviousHttpResponse>
ObliviousHttpResponse::CreateServerObliviousResponse(
std::string plaintext_payload,
ObliviousHttpRequest::Context& oblivious_http_request_context,
absl::string_view response_label, QuicheRandom* quiche_random) { … }
const std::string& ObliviousHttpResponse::EncapsulateAndSerialize() const { … }
const std::string& ObliviousHttpResponse::GetPlaintextData() const { … }
absl::StatusOr<ObliviousHttpResponse::CommonAeadParamsResult>
ObliviousHttpResponse::GetCommonAeadParams(
ObliviousHttpRequest::Context& oblivious_http_request_context) { … }
absl::StatusOr<ObliviousHttpResponse::CommonOperationsResult>
ObliviousHttpResponse::CommonOperationsToEncapDecap(
absl::string_view response_nonce,
ObliviousHttpRequest::Context& oblivious_http_request_context,
absl::string_view resp_label, const size_t aead_key_len,
const size_t aead_nonce_len, const size_t secret_len) { … }
}