Opened 7 years ago

Last modified 5 years ago

#11769 closed Bugs

64-bit hash_combine has weakness against zero input — at Version 1

Reported by: Andrey Semashev Owned by: Daniel James
Milestone: To Be Determined Component: hash
Version: Boost Development Trunk Severity: Problem
Keywords: Cc:

Description (last modified by Andrey Semashev)

The hash_combine_impl function for 64-bit size_t (see here) does not have an additive component. As a result, hashing strings of zeros always results in zero hash value regardless of the length of the string.

Change History (1)

comment:1 by Andrey Semashev, 7 years ago

Description: modified (diff)
Note: See TracTickets for help on using tickets.