#include "quiche/quic/tools/simple_ticket_crypter.h"
#include <memory>
#include <utility>
#include <vector>
#include "openssl/aead.h"
#include "openssl/rand.h"
namespace quic {
namespace {
constexpr QuicTime::Delta kTicketKeyLifetime = …;
constexpr size_t kEpochSize = …;
constexpr size_t kIVSize = …;
constexpr size_t kAuthTagSize = …;
constexpr size_t kIVOffset = …;
constexpr size_t kMessageOffset = …;
}
SimpleTicketCrypter::SimpleTicketCrypter(QuicClock* clock) : … { … }
SimpleTicketCrypter::~SimpleTicketCrypter() = default;
size_t SimpleTicketCrypter::MaxOverhead() { … }
std::vector<uint8_t> SimpleTicketCrypter::Encrypt(
absl::string_view in, absl::string_view encryption_key) { … }
std::vector<uint8_t> SimpleTicketCrypter::Decrypt(absl::string_view in) { … }
void SimpleTicketCrypter::Decrypt(
absl::string_view in,
std::shared_ptr<quic::ProofSource::DecryptCallback> callback) { … }
void SimpleTicketCrypter::MaybeRotateKeys() { … }
std::unique_ptr<SimpleTicketCrypter::Key> SimpleTicketCrypter::NewKey() { … }
}