
12 Dec
2024
12 Dec
'24
2:06 a.m.
Ivan Matek wrote:
Can you please elaborate why is this necessary(not speaking generally, just in this particular case)? I originally though we do Hash h2( h ); so that seed of h matters, but then I noticed that anyway at the end of function we do hash2::hash_append( h, f, w ); hash2::hash_append_size( h, f, m ); so for I presume seed of h matters even if we default constructed hashers in the loop.
It matters for the final hash value, but it won't matter for creating collisions by crafting unordered maps. That is, any collision will be seed-independent because w will not depend on the seed. And seed-independent collisions are bad.