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

Unified Diff: net/quic/core/crypto/chacha20_poly1305_decrypter_test.cc

Issue 2681793002: Landing Recent QUIC changes until 5:30 PM, Feb 3, 2017 UTC-5 (Closed)
Patch Set: sync and rebase Created 3 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
Index: net/quic/core/crypto/chacha20_poly1305_decrypter_test.cc
diff --git a/net/quic/core/crypto/chacha20_poly1305_decrypter_test.cc b/net/quic/core/crypto/chacha20_poly1305_decrypter_test.cc
index 6caa52fc40c49ed531dbc53205185dab0c7f16ee..aa766dbb21468533b3f6fd1c179a4a1235452232 100644
--- a/net/quic/core/crypto/chacha20_poly1305_decrypter_test.cc
+++ b/net/quic/core/crypto/chacha20_poly1305_decrypter_test.cc
@@ -117,19 +117,15 @@ QuicData* DecryptWithNonce(ChaCha20Poly1305Decrypter* decrypter,
StringPiece nonce,
StringPiece associated_data,
StringPiece ciphertext) {
- QuicPathId path_id = kDefaultPathId;
QuicPacketNumber packet_number;
StringPiece nonce_prefix(nonce.data(), nonce.size() - sizeof(packet_number));
decrypter->SetNoncePrefix(nonce_prefix);
memcpy(&packet_number, nonce.data() + nonce_prefix.size(),
sizeof(packet_number));
- path_id = static_cast<QuicPathId>(
- packet_number >> 8 * (sizeof(packet_number) - sizeof(path_id)));
- packet_number &= UINT64_C(0x00FFFFFFFFFFFFFF);
std::unique_ptr<char[]> output(new char[ciphertext.length()]);
size_t output_length = 0;
const bool success = decrypter->DecryptPacket(
- QuicVersionMax(), path_id, packet_number, associated_data, ciphertext,
+ QuicVersionMax(), packet_number, associated_data, ciphertext,
output.get(), &output_length, ciphertext.length());
if (!success) {
return nullptr;
« no previous file with comments | « net/quic/core/crypto/cert_compressor_test.cc ('k') | net/quic/core/crypto/chacha20_poly1305_encrypter_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698