blob: 2ff63a7ab2cbc6422d0f054dd75c698346369cfc [file] [log] [blame]
QUICHE team2d187972019-03-19 16:23:47 -07001// Copyright (c) 2013 The Chromium Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#ifndef QUICHE_QUIC_CORE_CRYPTO_AES_BASE_DECRYPTER_H_
6#define QUICHE_QUIC_CORE_CRYPTO_AES_BASE_DECRYPTER_H_
7
8#include <cstddef>
9
10#include "third_party/boringssl/src/include/openssl/aes.h"
11#include "net/third_party/quiche/src/quic/core/crypto/aead_base_decrypter.h"
12#include "net/third_party/quiche/src/quic/platform/api/quic_export.h"
dmcardle904ef182019-12-13 08:34:33 -080013#include "net/third_party/quiche/src/common/platform/api/quiche_string_piece.h"
QUICHE team2d187972019-03-19 16:23:47 -070014
15namespace quic {
16
17class QUIC_EXPORT_PRIVATE AesBaseDecrypter : public AeadBaseDecrypter {
18 public:
19 using AeadBaseDecrypter::AeadBaseDecrypter;
20
dmcardle904ef182019-12-13 08:34:33 -080021 bool SetHeaderProtectionKey(quiche::QuicheStringPiece key) override;
QUICHE team2d187972019-03-19 16:23:47 -070022 std::string GenerateHeaderProtectionMask(
23 QuicDataReader* sample_reader) override;
24
25 private:
26 // The key used for packet number encryption.
27 AES_KEY pne_key_;
28};
29
30} // namespace quic
31
32#endif // QUICHE_QUIC_CORE_CRYPTO_AES_BASE_DECRYPTER_H_