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

Side by Side Diff: net/quic/crypto/null_decrypter.cc

Issue 12806002: Land Recent QUIC Changes (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: minor comment fix Created 7 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 | Annotate | Revision Log
« no previous file with comments | « net/quic/crypto/null_decrypter.h ('k') | net/quic/crypto/null_encrypter.h » ('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 #include "net/quic/crypto/null_decrypter.h" 5 #include "net/quic/crypto/null_decrypter.h"
6 #include "net/quic/quic_utils.h" 6 #include "net/quic/quic_utils.h"
7 #include "net/quic/quic_data_reader.h" 7 #include "net/quic/quic_data_reader.h"
8 8
9 using base::StringPiece; 9 using base::StringPiece;
10 using std::string; 10 using std::string;
(...skipping 23 matching lines...) Expand all
34 // TODO(rch): avoid buffer copy here 34 // TODO(rch): avoid buffer copy here
35 string buffer = associated_data.as_string(); 35 string buffer = associated_data.as_string();
36 plaintext.AppendToString(&buffer); 36 plaintext.AppendToString(&buffer);
37 37
38 if (hash != QuicUtils::FNV1a_128_Hash(buffer.data(), buffer.length())) { 38 if (hash != QuicUtils::FNV1a_128_Hash(buffer.data(), buffer.length())) {
39 return NULL; 39 return NULL;
40 } 40 }
41 return new QuicData(plaintext.data(), plaintext.length()); 41 return new QuicData(plaintext.data(), plaintext.length());
42 } 42 }
43 43
44 StringPiece NullDecrypter::GetKey() const {
45 return StringPiece();
46 }
47
48 StringPiece NullDecrypter::GetNoncePrefix() const {
49 return StringPiece();
50 }
51
44 } // namespace net 52 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/crypto/null_decrypter.h ('k') | net/quic/crypto/null_encrypter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698