On 13 January 2016 at 22:30, Bjorn Reese
On 01/13/2016 11:18 PM, Andrey Semashev wrote:
Do you think we could add a few well-known hash functions to Boost.Hash so that they could be used for consistent results?
I was just about to suggest the same...
I frequently use hash functions to calculate fingerprints that are exchanged in network protocols, and here consistent results, both across platforms and boost releases, are essential.
I think I've always been clear that the library is not appropriate for such uses. In terms of hash quality, it does nothing more than meet the existing std::hash requirements (which are very low). It's also pretty much impossible to fit a stronger hash function into the existing interface. I actually regret calling it 'hash', I probably should have called it something less general. Technically its name is 'Functional/Hash', because std::hash is in the functional header, but that didn't make much sense to anyone.