|
Boost : |
From: Peter Dimov (pdimov_at_[hidden])
Date: 2024-12-12 02:06:03
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.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk