| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef NET_QUIC_CORE_CRYPTO_NULL_DECRYPTER_H_ | 5 #ifndef NET_QUIC_CORE_CRYPTO_NULL_DECRYPTER_H_ |
| 6 #define NET_QUIC_CORE_CRYPTO_NULL_DECRYPTER_H_ | 6 #define NET_QUIC_CORE_CRYPTO_NULL_DECRYPTER_H_ |
| 7 | 7 |
| 8 #include <cstddef> | 8 #include <cstddef> |
| 9 #include <cstdint> | 9 #include <cstdint> |
| 10 | 10 |
| (...skipping 15 matching lines...) Expand all Loading... |
| 26 public: | 26 public: |
| 27 explicit NullDecrypter(Perspective perspective); | 27 explicit NullDecrypter(Perspective perspective); |
| 28 ~NullDecrypter() override {} | 28 ~NullDecrypter() override {} |
| 29 | 29 |
| 30 // QuicDecrypter implementation | 30 // QuicDecrypter implementation |
| 31 bool SetKey(base::StringPiece key) override; | 31 bool SetKey(base::StringPiece key) override; |
| 32 bool SetNoncePrefix(base::StringPiece nonce_prefix) override; | 32 bool SetNoncePrefix(base::StringPiece nonce_prefix) override; |
| 33 bool SetPreliminaryKey(base::StringPiece key) override; | 33 bool SetPreliminaryKey(base::StringPiece key) override; |
| 34 bool SetDiversificationNonce(const DiversificationNonce& nonce) override; | 34 bool SetDiversificationNonce(const DiversificationNonce& nonce) override; |
| 35 bool DecryptPacket(QuicVersion version, | 35 bool DecryptPacket(QuicVersion version, |
| 36 QuicPathId path_id, | |
| 37 QuicPacketNumber packet_number, | 36 QuicPacketNumber packet_number, |
| 38 base::StringPiece associated_data, | 37 base::StringPiece associated_data, |
| 39 base::StringPiece ciphertext, | 38 base::StringPiece ciphertext, |
| 40 char* output, | 39 char* output, |
| 41 size_t* output_length, | 40 size_t* output_length, |
| 42 size_t max_output_length) override; | 41 size_t max_output_length) override; |
| 43 base::StringPiece GetKey() const override; | 42 base::StringPiece GetKey() const override; |
| 44 base::StringPiece GetNoncePrefix() const override; | 43 base::StringPiece GetNoncePrefix() const override; |
| 45 | 44 |
| 46 const char* cipher_name() const override; | 45 const char* cipher_name() const override; |
| 47 uint32_t cipher_id() const override; | 46 uint32_t cipher_id() const override; |
| 48 | 47 |
| 49 private: | 48 private: |
| 50 bool ReadHash(QuicDataReader* reader, uint128* hash); | 49 bool ReadHash(QuicDataReader* reader, uint128* hash); |
| 51 uint128 ComputeHash(QuicVersion version, | 50 uint128 ComputeHash(QuicVersion version, |
| 52 base::StringPiece data1, | 51 base::StringPiece data1, |
| 53 base::StringPiece data2) const; | 52 base::StringPiece data2) const; |
| 54 | 53 |
| 55 Perspective perspective_; | 54 Perspective perspective_; |
| 56 | 55 |
| 57 DISALLOW_COPY_AND_ASSIGN(NullDecrypter); | 56 DISALLOW_COPY_AND_ASSIGN(NullDecrypter); |
| 58 }; | 57 }; |
| 59 | 58 |
| 60 } // namespace net | 59 } // namespace net |
| 61 | 60 |
| 62 #endif // NET_QUIC_CORE_CRYPTO_NULL_DECRYPTER_H_ | 61 #endif // NET_QUIC_CORE_CRYPTO_NULL_DECRYPTER_H_ |
| OLD | NEW |