Subject: Re: [Boost-bugs] [Boost C++ Libraries] #11769: 64-bit hash_combine has weakness against zero input
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2015-10-28 13:27:38
#11769: 64-bit hash_combine has weakness against zero input
--------------------------------------+-------------------------
Reporter: andysem | Owner: danieljames
Type: Bugs | Status: new
Milestone: To Be Determined | Component: hash
Version: Boost Development Trunk | Severity: Problem
Resolution: | Keywords:
--------------------------------------+-------------------------
Description changed by andysem:
Old description:
> The `hash_combine_impl` function for 64-bit `size_t` (see
> [https://github.com/boostorg/functional/blob/develop/include/boost/functional/hash/hash.hpp#L237
> here]) does not have an additive component. As a result, hashing strings
> of zeros always results in zero has value regardless of the length of the
> string.
New description:
The `hash_combine_impl` function for 64-bit `size_t` (see
[https://github.com/boostorg/functional/blob/develop/include/boost/functional/hash/hash.hpp#L237
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.
-- -- Ticket URL: <https://svn.boost.org/trac/boost/ticket/11769#comment:1> Boost C++ Libraries <http://www.boost.org/> Boost provides free peer-reviewed portable C++ source libraries.
This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:19 UTC