Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(692)

Unified Diff: net/quic/crypto/quic_decrypter.h

Issue 935333002: Update from https://crrev.com/316786 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/quic/crypto/quic_crypto_server_config_test.cc ('k') | net/quic/crypto/quic_encrypter.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/crypto/quic_decrypter.h
diff --git a/net/quic/crypto/quic_decrypter.h b/net/quic/crypto/quic_decrypter.h
index 9e6e1d27e37082e35c18bb7e166aa7fbb43bf52c..9e02a16f4677faed41c9bfb50b5a399d12385bad 100644
--- a/net/quic/crypto/quic_decrypter.h
+++ b/net/quic/crypto/quic_decrypter.h
@@ -39,15 +39,20 @@ class NET_EXPORT_PRIVATE QuicDecrypter {
// packet sequence number, even when retransmitting a lost packet.
virtual bool SetNoncePrefix(base::StringPiece nonce_prefix) = 0;
- // Returns a newly created QuicData object containing the decrypted
- // |ciphertext| or nullptr if there is an error. |sequence_number| is
+ // Populates |output| with the decrypted |ciphertext| and populates
+ // |output_length| with the length. Returns 0 if there is an error.
+ // |output| size is specified by |max_output_length| and must be
+ // at least as large as the ciphertext. |sequence_number| is
// appended to the |nonce_prefix| value provided in SetNoncePrefix()
// to form the nonce.
// TODO(wtc): add a way for DecryptPacket to report decryption failure due
// to non-authentic inputs, as opposed to other reasons for failure.
- virtual QuicData* DecryptPacket(QuicPacketSequenceNumber sequence_number,
- base::StringPiece associated_data,
- base::StringPiece ciphertext) = 0;
+ virtual bool DecryptPacket(QuicPacketSequenceNumber sequence_number,
+ const base::StringPiece& associated_data,
+ const base::StringPiece& ciphertext,
+ char* output,
+ size_t* output_length,
+ size_t max_output_length) = 0;
// For use by unit tests only.
virtual base::StringPiece GetKey() const = 0;
« no previous file with comments | « net/quic/crypto/quic_crypto_server_config_test.cc ('k') | net/quic/crypto/quic_encrypter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698