diff --git a/Hashes.cpp b/Hashes.cpp index a2ab6ed6..55c81fc2 100644 --- a/Hashes.cpp +++ b/Hashes.cpp @@ -1150,10 +1150,8 @@ void halftime_hash_seed_init(size_t &seed) static uint8_t tsip_key[16]; void tsip_init() { - uint64_t r = rand_u64(); - memcpy(&tsip_key[0], &r, 8); - r = rand_u64(); - memcpy(&tsip_key[8], &r, 8); + Rand rng(UINT32_C(4044698852)); + rng.rand_p(tsip_key, sizeof(tsip_key)); } void tsip_test(const void *bytes, int len, uint32_t seed, void *out) { diff --git a/main.cpp b/main.cpp index e2fc2f10..82998185 100644 --- a/main.cpp +++ b/main.cpp @@ -606,7 +606,7 @@ HashInfo g_hashes[] = // as in rust and swift: { siphash13_test, 64, 0x29C010BF, "SipHash13", "SipHash 1-3 - SSSE3 optimized", GOOD, {} }, #ifndef _MSC_VER -{ tsip_test, 64, 0xF47B451B, "TSip", "Damian Gryski's Tiny SipHash variant", GOOD, {} }, +{ tsip_test, 64, 0x521035BD, "TSip", "Damian Gryski's Tiny SipHash variant", GOOD, {} }, #ifdef HAVE_INT64 { seahash_test, 64, 0xF0374078, "seahash", "seahash (64-bit, little-endian)", GOOD, {} }, { seahash32low, 32, 0x712F0EE8, "seahash32low","seahash - lower 32bit", GOOD, {} },