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

Unified Diff: net/quic/quic_utils.cc

Issue 12340054: use the correct constant in the FNV1a_128_Hash function as defined in the specification (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix AUTHORS and git author and codereview account to use the same email address Created 7 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/quic/crypto/null_encrypter_test.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/quic_utils.cc
diff --git a/net/quic/quic_utils.cc b/net/quic/quic_utils.cc
index 0628dee25eea44e3431a6959821569698d5106cc..ae52876adf6a19482968164c935ee1bca243d86c 100644
--- a/net/quic/quic_utils.cc
+++ b/net/quic/quic_utils.cc
@@ -20,11 +20,12 @@ size_t QuicUtils::StreamFramePacketOverhead(int num_frames) {
// static
uint128 QuicUtils::FNV1a_128_Hash(const char* data, int len) {
// The following two constants are defined as part of the hash algorithm.
+ // see http://www.isthe.com/chongo/tech/comp/fnv/
// 309485009821345068724781371
const uint128 kPrime(16777216, 315);
- // 14406626329776981559649562966706236762
- const uint128 kOffset(GG_UINT64_C(780984778246553632),
- GG_UINT64_C(4400696054689967450));
+ // 144066263297769815596495629667062367629
+ const uint128 kOffset(GG_UINT64_C(7809847782465536322),
+ GG_UINT64_C(7113472399480571277));
const uint8* octets = reinterpret_cast<const uint8*>(data);
« no previous file with comments | « net/quic/crypto/null_encrypter_test.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698