| OLD | NEW |
| 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/core/crypto/null_decrypter.h" | 5 #include "net/quic/core/crypto/null_decrypter.h" |
| 6 | 6 |
| 7 #include <cstdint> | 7 #include <cstdint> |
| 8 | 8 |
| 9 #include "net/base/int128.h" | 9 #include "net/base/int128.h" |
| 10 #include "net/quic/core/quic_bug_tracker.h" | |
| 11 #include "net/quic/core/quic_data_reader.h" | 10 #include "net/quic/core/quic_data_reader.h" |
| 12 #include "net/quic/core/quic_utils.h" | 11 #include "net/quic/core/quic_utils.h" |
| 12 #include "net/quic/platform/api/quic_bug_tracker.h" |
| 13 | 13 |
| 14 using base::StringPiece; | 14 using base::StringPiece; |
| 15 using std::string; | 15 using std::string; |
| 16 | 16 |
| 17 namespace net { | 17 namespace net { |
| 18 | 18 |
| 19 NullDecrypter::NullDecrypter(Perspective perspective) | 19 NullDecrypter::NullDecrypter(Perspective perspective) |
| 20 : perspective_(perspective) {} | 20 : perspective_(perspective) {} |
| 21 | 21 |
| 22 bool NullDecrypter::SetKey(StringPiece key) { | 22 bool NullDecrypter::SetKey(StringPiece key) { |
| (...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 108 } else { | 108 } else { |
| 109 correct_hash = QuicUtils::FNV1a_128_Hash_Two(data1, data2); | 109 correct_hash = QuicUtils::FNV1a_128_Hash_Two(data1, data2); |
| 110 } | 110 } |
| 111 uint128 mask = MakeUint128(UINT64_C(0x0), UINT64_C(0xffffffff)); | 111 uint128 mask = MakeUint128(UINT64_C(0x0), UINT64_C(0xffffffff)); |
| 112 mask <<= 96; | 112 mask <<= 96; |
| 113 correct_hash &= ~mask; | 113 correct_hash &= ~mask; |
| 114 return correct_hash; | 114 return correct_hash; |
| 115 } | 115 } |
| 116 | 116 |
| 117 } // namespace net | 117 } // namespace net |
| OLD | NEW |