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

Side by Side Diff: net/quic/core/crypto/crypto_utils.cc

Issue 2193073003: Move shared files in net/quic/ into net/quic/core/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: io_thread_unittest.cc Created 4 years, 4 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/core/crypto/crypto_utils.h ('k') | net/quic/core/crypto/crypto_utils_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) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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/crypto_utils.h" 5 #include "net/quic/core/crypto/crypto_utils.h"
6 6
7 #include <memory> 7 #include <memory>
8 8
9 #include "crypto/hkdf.h" 9 #include "crypto/hkdf.h"
10 #include "crypto/secure_hash.h" 10 #include "crypto/secure_hash.h"
11 #include "net/base/url_util.h" 11 #include "net/base/url_util.h"
12 #include "net/quic/crypto/crypto_handshake.h" 12 #include "net/quic/core/crypto/crypto_handshake.h"
13 #include "net/quic/crypto/crypto_protocol.h" 13 #include "net/quic/core/crypto/crypto_protocol.h"
14 #include "net/quic/crypto/quic_decrypter.h" 14 #include "net/quic/core/crypto/quic_decrypter.h"
15 #include "net/quic/crypto/quic_encrypter.h" 15 #include "net/quic/core/crypto/quic_encrypter.h"
16 #include "net/quic/crypto/quic_random.h" 16 #include "net/quic/core/crypto/quic_random.h"
17 #include "net/quic/quic_bug_tracker.h" 17 #include "net/quic/core/quic_bug_tracker.h"
18 #include "net/quic/quic_time.h" 18 #include "net/quic/core/quic_time.h"
19 #include "net/quic/quic_utils.h" 19 #include "net/quic/core/quic_utils.h"
20 #include "url/url_canon.h" 20 #include "url/url_canon.h"
21 21
22 using base::StringPiece; 22 using base::StringPiece;
23 using std::numeric_limits; 23 using std::numeric_limits;
24 using std::string; 24 using std::string;
25 25
26 namespace net { 26 namespace net {
27 27
28 // static 28 // static
29 void CryptoUtils::GenerateNonce(QuicWallTime now, 29 void CryptoUtils::GenerateNonce(QuicWallTime now,
(...skipping 301 matching lines...) Expand 10 before | Expand all | Expand 10 after
331 const QuicData& serialized = message.GetSerialized(); 331 const QuicData& serialized = message.GetSerialized();
332 std::unique_ptr<crypto::SecureHash> hash( 332 std::unique_ptr<crypto::SecureHash> hash(
333 crypto::SecureHash::Create(crypto::SecureHash::SHA256)); 333 crypto::SecureHash::Create(crypto::SecureHash::SHA256));
334 hash->Update(serialized.data(), serialized.length()); 334 hash->Update(serialized.data(), serialized.length());
335 uint8_t digest[32]; 335 uint8_t digest[32];
336 hash->Finish(digest, sizeof(digest)); 336 hash->Finish(digest, sizeof(digest));
337 output->assign(reinterpret_cast<const char*>(&digest), sizeof(digest)); 337 output->assign(reinterpret_cast<const char*>(&digest), sizeof(digest));
338 } 338 }
339 339
340 } // namespace net 340 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/core/crypto/crypto_utils.h ('k') | net/quic/core/crypto/crypto_utils_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698