Skip to content

Commit

Permalink
halftime_hash broke with MSVC
Browse files Browse the repository at this point in the history
  • Loading branch information
rurban committed Dec 12, 2024
1 parent b0e5cfe commit b34375f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions Hashes.h
Original file line number Diff line number Diff line change
Expand Up @@ -563,6 +563,7 @@ void clhash_seed_init(size_t &seed);
void clhash_test (const void * key, int len, uint32_t seed, void * out);
#endif

#ifndef _MSC_VER
// objsize 454880-4554f3: 2911
void halftime_hash_style64_test(const void *key, int len, uint32_t seed, void *out);
// 455e90 - 45682e: 2462
Expand All @@ -571,6 +572,7 @@ void halftime_hash_style128_test(const void *key, int len, uint32_t seed, void *
void halftime_hash_style256_test(const void *key, int len, uint32_t seed, void *out);
// 457a60 - 45883e: 3550 (without AVX512 on Ryzen3)
void halftime_hash_style512_test(const void *key, int len, uint32_t seed, void *out);
#endif
void halftime_hash_init();
void halftime_hash_seed_init(size_t &seed);

Expand Down
3 changes: 2 additions & 1 deletion main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -698,6 +698,7 @@ HashInfo g_hashes[] =
{ umash, 64, 0x161495C6, "umash64", "umash 64", GOOD, {} },
{ umash128, 128, 0x36D4EC95, "umash128", "umash 128", GOOD, {} },
#endif
#ifndef _MSC_VER
{ halftime_hash_style64_test, 64, 0x0, "halftime_hash64", "NH tree hash variant", GOOD,
{0xc61d672b, 0xcc70c4c1798e4a6f, 0xd3833e804f4c574b, 0xecfc1357d65941ae, 0xbe1927f97b8c43f1,
0xf4d4beb14ae042bbULL, 0x9a9b4c4e44dd48d1ULL} }, // not vulnerable
Expand All @@ -710,7 +711,7 @@ HashInfo g_hashes[] =
{ halftime_hash_style512_test, 64, 0x0, "halftime_hash512", "NH tree hash variant", GOOD,
{0xc61d672b, 0xcc70c4c1798e4a6f, 0xd3833e804f4c574b, 0xecfc1357d65941ae, 0xbe1927f97b8c43f1,
0xf4d4beb14ae042bbULL, 0x9a9b4c4e44dd48d1ULL} },

#endif
{ t1ha2_atonce_test, 64, 0x8F16C948, "t1ha2_atonce", "Fast Positive Hash (portable", GOOD, {
} },
{ t1ha2_stream_test, 64, 0xDED9B580, "t1ha2_stream", "Fast Positive Hash (portable)", POOR, {} },
Expand Down

0 comments on commit b34375f

Please sign in to comment.