blob: d7ad7419526302cdf7ae3e47d06e4a4060f4c680 [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_CHACHA_BASE_DECRYPTER_H_
6#define QUICHE_QUIC_CORE_CRYPTO_CHACHA_BASE_DECRYPTER_H_
7
8#include <cstddef>
9
10#include "net/third_party/quiche/src/quic/core/crypto/aead_base_decrypter.h"
11#include "net/third_party/quiche/src/quic/platform/api/quic_export.h"
12#include "net/third_party/quiche/src/quic/platform/api/quic_string_piece.h"
13
14namespace quic {
15
16class QUIC_EXPORT_PRIVATE ChaChaBaseDecrypter : public AeadBaseDecrypter {
17 public:
18 using AeadBaseDecrypter::AeadBaseDecrypter;
19
20 bool SetHeaderProtectionKey(QuicStringPiece key) override;
21 std::string GenerateHeaderProtectionMask(
22 QuicDataReader* sample_reader) override;
23
24 private:
25 // The key used for packet number encryption.
26 unsigned char pne_key_[kMaxKeySize];
27};
28
29} // namespace quic
30
31#endif // QUICHE_QUIC_CORE_CRYPTO_CHACHA_BASE_DECRYPTER_H_