diff --git a/Hashes.cpp b/Hashes.cpp index 55c81fc2..f02bbb53 100644 --- a/Hashes.cpp +++ b/Hashes.cpp @@ -388,7 +388,7 @@ FNV128(uint64_t buf[2], const char *key, int len, uint64_t seed) uint64_t s0 = multhi; // high uint64_t s1 = prime128Lower * buf[1]; // low - s0 += buf[1] << (prime128Shift + prime128Lower * buf[0]); + s0 += (buf[1] << prime128Shift) + prime128Lower * buf[0]; // Update the values buf[1] = s1; diff --git a/main.cpp b/main.cpp index 386af516..8cc72027 100644 --- a/main.cpp +++ b/main.cpp @@ -276,7 +276,7 @@ HashInfo g_hashes[] = {0x811c9dc5, 0x23d4a49d} /* !! */ }, { FNV64a_test, 64, 0x103455FC, "FNV64", "Fowler-Noll-Vo hash, 64-bit", POOR, {0x811c9dc5, 0xcbf29ce4, 0x84222325, 0xcbf29ce484222325} /* TODO */}, -{ FNV128_test, 128, 0xBCAA1426, "FNV128", "Go variant of FNV, 128-bit", POOR, {} }, +{ FNV128_test, 128, 0xC6FF4526, "FNV128", "Go variant of FNV, 128-bit", POOR, {} }, #endif { FNV2_test, __WORDSIZE, FNV2_VERIF, "FNV2", "wordwise FNV", POOR, {} }, { fletcher2_test, 64, 0x890767C0, "fletcher2", "fletcher2 ZFS", POOR, {0UL} /* !! */ },