| 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_QUIC_FRAMER_H_ | 5 #ifndef NET_QUIC_CORE_QUIC_FRAMER_H_ |
| 6 #define NET_QUIC_CORE_QUIC_FRAMER_H_ | 6 #define NET_QUIC_CORE_QUIC_FRAMER_H_ |
| 7 | 7 |
| 8 #include <cstddef> | 8 #include <cstddef> |
| 9 #include <cstdint> | 9 #include <cstdint> |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 291 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 302 QuicPathId path_id, | 302 QuicPathId path_id, |
| 303 QuicPacketNumber packet_number, | 303 QuicPacketNumber packet_number, |
| 304 size_t ad_len, | 304 size_t ad_len, |
| 305 size_t total_len, | 305 size_t total_len, |
| 306 size_t buffer_len, | 306 size_t buffer_len, |
| 307 char* buffer); | 307 char* buffer); |
| 308 | 308 |
| 309 // Returns the length of the data encrypted into |buffer| if |buffer_len| is | 309 // Returns the length of the data encrypted into |buffer| if |buffer_len| is |
| 310 // long enough, and otherwise 0. | 310 // long enough, and otherwise 0. |
| 311 size_t EncryptPayload(EncryptionLevel level, | 311 size_t EncryptPayload(EncryptionLevel level, |
| 312 QuicPathId path_id, | |
| 313 QuicPacketNumber packet_number, | 312 QuicPacketNumber packet_number, |
| 314 const QuicPacket& packet, | 313 const QuicPacket& packet, |
| 315 char* buffer, | 314 char* buffer, |
| 316 size_t buffer_len); | 315 size_t buffer_len); |
| 317 | 316 |
| 318 // Returns the maximum length of plaintext that can be encrypted | 317 // Returns the maximum length of plaintext that can be encrypted |
| 319 // to ciphertext no larger than |ciphertext_size|. | 318 // to ciphertext no larger than |ciphertext_size|. |
| 320 size_t GetMaxPlaintextSize(size_t ciphertext_size); | 319 size_t GetMaxPlaintextSize(size_t ciphertext_size); |
| 321 | 320 |
| 322 const std::string& detailed_error() { return detailed_error_; } | 321 const std::string& detailed_error() { return detailed_error_; } |
| (...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 545 QuicTime::Delta last_timestamp_; | 544 QuicTime::Delta last_timestamp_; |
| 546 // The diversification nonce from the last received packet. | 545 // The diversification nonce from the last received packet. |
| 547 DiversificationNonce last_nonce_; | 546 DiversificationNonce last_nonce_; |
| 548 | 547 |
| 549 DISALLOW_COPY_AND_ASSIGN(QuicFramer); | 548 DISALLOW_COPY_AND_ASSIGN(QuicFramer); |
| 550 }; | 549 }; |
| 551 | 550 |
| 552 } // namespace net | 551 } // namespace net |
| 553 | 552 |
| 554 #endif // NET_QUIC_CORE_QUIC_FRAMER_H_ | 553 #endif // NET_QUIC_CORE_QUIC_FRAMER_H_ |
| OLD | NEW |