| 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 "crypto/hkdf.h" | 7 #include "crypto/hkdf.h" |
| 8 #include "googleurl/src/url_canon.h" | |
| 9 #include "net/base/net_util.h" | 8 #include "net/base/net_util.h" |
| 10 #include "net/quic/crypto/crypto_handshake.h" | 9 #include "net/quic/crypto/crypto_handshake.h" |
| 11 #include "net/quic/crypto/crypto_protocol.h" | 10 #include "net/quic/crypto/crypto_protocol.h" |
| 12 #include "net/quic/crypto/quic_decrypter.h" | 11 #include "net/quic/crypto/quic_decrypter.h" |
| 13 #include "net/quic/crypto/quic_encrypter.h" | 12 #include "net/quic/crypto/quic_encrypter.h" |
| 14 #include "net/quic/crypto/quic_random.h" | 13 #include "net/quic/crypto/quic_random.h" |
| 15 #include "net/quic/quic_time.h" | 14 #include "net/quic/quic_time.h" |
| 15 #include "url/url_canon.h" |
| 16 | 16 |
| 17 using base::StringPiece; | 17 using base::StringPiece; |
| 18 using std::string; | 18 using std::string; |
| 19 | 19 |
| 20 namespace net { | 20 namespace net { |
| 21 | 21 |
| 22 // static | 22 // static |
| 23 void CryptoUtils::GenerateNonce(QuicWallTime now, | 23 void CryptoUtils::GenerateNonce(QuicWallTime now, |
| 24 QuicRandom* random_generator, | 24 QuicRandom* random_generator, |
| 25 StringPiece orbit, | 25 StringPiece orbit, |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 105 out->decrypter->SetNoncePrefix(hkdf.client_write_iv()); | 105 out->decrypter->SetNoncePrefix(hkdf.client_write_iv()); |
| 106 } else { | 106 } else { |
| 107 out->encrypter->SetKey(hkdf.client_write_key()); | 107 out->encrypter->SetKey(hkdf.client_write_key()); |
| 108 out->encrypter->SetNoncePrefix(hkdf.client_write_iv()); | 108 out->encrypter->SetNoncePrefix(hkdf.client_write_iv()); |
| 109 out->decrypter->SetKey(hkdf.server_write_key()); | 109 out->decrypter->SetKey(hkdf.server_write_key()); |
| 110 out->decrypter->SetNoncePrefix(hkdf.server_write_iv()); | 110 out->decrypter->SetNoncePrefix(hkdf.server_write_iv()); |
| 111 } | 111 } |
| 112 } | 112 } |
| 113 | 113 |
| 114 } // namespace net | 114 } // namespace net |
| OLD | NEW |