chromium/net/third_party/quiche/src/quiche/quic/tools/simple_ticket_crypter.h

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

#ifndef QUICHE_QUIC_TOOLS_SIMPLE_TICKET_CRYPTER_H_
#define QUICHE_QUIC_TOOLS_SIMPLE_TICKET_CRYPTER_H_

#include "openssl/aead.h"
#include "quiche/quic/core/crypto/proof_source.h"
#include "quiche/quic/core/quic_clock.h"
#include "quiche/quic/core/quic_time.h"

namespace quic {

// SimpleTicketCrypter implements the QUIC ProofSource::TicketCrypter interface.
// It generates a random key at startup and every 7 days it rotates the key,
// keeping track of the previous key used to facilitate decrypting older
// tickets. This implementation is not suitable for server setups where multiple
// servers need to share keys.
class QUIC_NO_EXPORT SimpleTicketCrypter
    : public quic::ProofSource::TicketCrypter {};

}  // namespace quic

#endif  // QUICHE_QUIC_TOOLS_SIMPLE_TICKET_CRYPTER_H_