| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 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 | 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_CRYPTO_AEAD_BASE_DECRYPTER_H_ | 5 #ifndef NET_QUIC_CRYPTO_AEAD_BASE_DECRYPTER_H_ |
| 6 #define NET_QUIC_CRYPTO_AEAD_BASE_DECRYPTER_H_ | 6 #define NET_QUIC_CRYPTO_AEAD_BASE_DECRYPTER_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 | 9 |
| 10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
| (...skipping 22 matching lines...) Expand all Loading... |
| 33 size_t auth_tag_size, | 33 size_t auth_tag_size, |
| 34 size_t nonce_prefix_size); | 34 size_t nonce_prefix_size); |
| 35 #endif | 35 #endif |
| 36 ~AeadBaseDecrypter() override; | 36 ~AeadBaseDecrypter() override; |
| 37 | 37 |
| 38 // QuicDecrypter implementation | 38 // QuicDecrypter implementation |
| 39 bool SetKey(base::StringPiece key) override; | 39 bool SetKey(base::StringPiece key) override; |
| 40 bool SetNoncePrefix(base::StringPiece nonce_prefix) override; | 40 bool SetNoncePrefix(base::StringPiece nonce_prefix) override; |
| 41 bool DecryptPacket(QuicPathId path_id, | 41 bool DecryptPacket(QuicPathId path_id, |
| 42 QuicPacketNumber packet_number, | 42 QuicPacketNumber packet_number, |
| 43 const base::StringPiece& associated_data, | 43 base::StringPiece associated_data, |
| 44 const base::StringPiece& ciphertext, | 44 base::StringPiece ciphertext, |
| 45 char* output, | 45 char* output, |
| 46 size_t* output_length, | 46 size_t* output_length, |
| 47 size_t max_output_length) override; | 47 size_t max_output_length) override; |
| 48 base::StringPiece GetKey() const override; | 48 base::StringPiece GetKey() const override; |
| 49 base::StringPiece GetNoncePrefix() const override; | 49 base::StringPiece GetNoncePrefix() const override; |
| 50 | 50 |
| 51 protected: | 51 protected: |
| 52 // Make these constants available to the subclasses so that the subclasses | 52 // Make these constants available to the subclasses so that the subclasses |
| 53 // can assert at compile time their key_size_ and nonce_prefix_size_ do not | 53 // can assert at compile time their key_size_ and nonce_prefix_size_ do not |
| 54 // exceed the maximum. | 54 // exceed the maximum. |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 88 #if defined(USE_OPENSSL) | 88 #if defined(USE_OPENSSL) |
| 89 ScopedEVPAEADCtx ctx_; | 89 ScopedEVPAEADCtx ctx_; |
| 90 #endif | 90 #endif |
| 91 | 91 |
| 92 DISALLOW_COPY_AND_ASSIGN(AeadBaseDecrypter); | 92 DISALLOW_COPY_AND_ASSIGN(AeadBaseDecrypter); |
| 93 }; | 93 }; |
| 94 | 94 |
| 95 } // namespace net | 95 } // namespace net |
| 96 | 96 |
| 97 #endif // NET_QUIC_CRYPTO_AEAD_BASE_DECRYPTER_H_ | 97 #endif // NET_QUIC_CRYPTO_AEAD_BASE_DECRYPTER_H_ |
| OLD | NEW |