OLD | NEW |
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/crypto/crypto_utils.h" |
6 | 6 |
| 7 #include <memory> |
| 8 |
7 #include "crypto/hkdf.h" | 9 #include "crypto/hkdf.h" |
8 #include "crypto/secure_hash.h" | 10 #include "crypto/secure_hash.h" |
9 #include "net/base/url_util.h" | 11 #include "net/base/url_util.h" |
10 #include "net/quic/crypto/crypto_handshake.h" | 12 #include "net/quic/crypto/crypto_handshake.h" |
11 #include "net/quic/crypto/crypto_protocol.h" | 13 #include "net/quic/crypto/crypto_protocol.h" |
12 #include "net/quic/crypto/quic_decrypter.h" | 14 #include "net/quic/crypto/quic_decrypter.h" |
13 #include "net/quic/crypto/quic_encrypter.h" | 15 #include "net/quic/crypto/quic_encrypter.h" |
14 #include "net/quic/crypto/quic_random.h" | 16 #include "net/quic/crypto/quic_random.h" |
15 #include "net/quic/quic_time.h" | 17 #include "net/quic/quic_time.h" |
16 #include "net/quic/quic_utils.h" | 18 #include "net/quic/quic_utils.h" |
(...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
281 const QuicData& serialized = message.GetSerialized(); | 283 const QuicData& serialized = message.GetSerialized(); |
282 std::unique_ptr<crypto::SecureHash> hash( | 284 std::unique_ptr<crypto::SecureHash> hash( |
283 crypto::SecureHash::Create(crypto::SecureHash::SHA256)); | 285 crypto::SecureHash::Create(crypto::SecureHash::SHA256)); |
284 hash->Update(serialized.data(), serialized.length()); | 286 hash->Update(serialized.data(), serialized.length()); |
285 uint8_t digest[32]; | 287 uint8_t digest[32]; |
286 hash->Finish(digest, sizeof(digest)); | 288 hash->Finish(digest, sizeof(digest)); |
287 output->assign(reinterpret_cast<const char*>(&digest), sizeof(digest)); | 289 output->assign(reinterpret_cast<const char*>(&digest), sizeof(digest)); |
288 } | 290 } |
289 | 291 |
290 } // namespace net | 292 } // namespace net |
OLD | NEW |