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

Side by Side Diff: net/quic/crypto/quic_decrypter.h

Issue 1787453002: Switch "const StringPiece&" to just "StringPiece" in QUIC code. No functional change. Not flag prot… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@116566297
Patch Set: Remove const StringPiece& from _nss crypto files. Created 4 years, 9 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 unified diff | Download patch
« no previous file with comments | « net/quic/crypto/p256_key_exchange_openssl.cc ('k') | net/quic/quic_connection_test.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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_CRYPTO_QUIC_DECRYPTER_H_ 5 #ifndef NET_QUIC_CRYPTO_QUIC_DECRYPTER_H_
6 #define NET_QUIC_CRYPTO_QUIC_DECRYPTER_H_ 6 #define NET_QUIC_CRYPTO_QUIC_DECRYPTER_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 // Populates |output| with the decrypted |ciphertext| and populates 45 // Populates |output| with the decrypted |ciphertext| and populates
46 // |output_length| with the length. Returns 0 if there is an error. 46 // |output_length| with the length. Returns 0 if there is an error.
47 // |output| size is specified by |max_output_length| and must be 47 // |output| size is specified by |max_output_length| and must be
48 // at least as large as the ciphertext. |packet_number| is 48 // at least as large as the ciphertext. |packet_number| is
49 // appended to the |nonce_prefix| value provided in SetNoncePrefix() 49 // appended to the |nonce_prefix| value provided in SetNoncePrefix()
50 // to form the nonce. 50 // to form the nonce.
51 // TODO(wtc): add a way for DecryptPacket to report decryption failure due 51 // TODO(wtc): add a way for DecryptPacket to report decryption failure due
52 // to non-authentic inputs, as opposed to other reasons for failure. 52 // to non-authentic inputs, as opposed to other reasons for failure.
53 virtual bool DecryptPacket(QuicPathId path_id, 53 virtual bool DecryptPacket(QuicPathId path_id,
54 QuicPacketNumber packet_number, 54 QuicPacketNumber packet_number,
55 const base::StringPiece& associated_data, 55 base::StringPiece associated_data,
56 const base::StringPiece& ciphertext, 56 base::StringPiece ciphertext,
57 char* output, 57 char* output,
58 size_t* output_length, 58 size_t* output_length,
59 size_t max_output_length) = 0; 59 size_t max_output_length) = 0;
60 60
61 // The name of the cipher. 61 // The name of the cipher.
62 virtual const char* cipher_name() const = 0; 62 virtual const char* cipher_name() const = 0;
63 // The ID of the cipher. Return 0x03000000 ORed with the 'cryptographic suite 63 // The ID of the cipher. Return 0x03000000 ORed with the 'cryptographic suite
64 // selector'. 64 // selector'.
65 virtual uint32_t cipher_id() const = 0; 65 virtual uint32_t cipher_id() const = 0;
66 66
67 // For use by unit tests only. 67 // For use by unit tests only.
68 virtual base::StringPiece GetKey() const = 0; 68 virtual base::StringPiece GetKey() const = 0;
69 virtual base::StringPiece GetNoncePrefix() const = 0; 69 virtual base::StringPiece GetNoncePrefix() const = 0;
70 }; 70 };
71 71
72 } // namespace net 72 } // namespace net
73 73
74 #endif // NET_QUIC_CRYPTO_QUIC_DECRYPTER_H_ 74 #endif // NET_QUIC_CRYPTO_QUIC_DECRYPTER_H_
OLDNEW
« no previous file with comments | « net/quic/crypto/p256_key_exchange_openssl.cc ('k') | net/quic/quic_connection_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698