QUICHE team | 2d18797 | 2019-03-19 16:23:47 -0700 | [diff] [blame] | 1 | // 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" |
dmcardle | 904ef18 | 2019-12-13 08:34:33 -0800 | [diff] [blame] | 13 | #include "net/third_party/quiche/src/common/platform/api/quiche_string_piece.h" |
QUICHE team | 2d18797 | 2019-03-19 16:23:47 -0700 | [diff] [blame] | 14 | |
| 15 | namespace quic { |
| 16 | |
| 17 | class QUIC_EXPORT_PRIVATE AesBaseDecrypter : public AeadBaseDecrypter { |
| 18 | public: |
| 19 | using AeadBaseDecrypter::AeadBaseDecrypter; |
| 20 | |
dmcardle | 904ef18 | 2019-12-13 08:34:33 -0800 | [diff] [blame] | 21 | bool SetHeaderProtectionKey(quiche::QuicheStringPiece key) override; |
QUICHE team | 2d18797 | 2019-03-19 16:23:47 -0700 | [diff] [blame] | 22 | 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_ |