mirror of https://github.com/c-ares/c-ares.git
The FNV1a implementation used in the hashtable threw away the algorithm's offset basis in preference of the seed value to ensure different instances of the hashtable produced different output for the same keys to prevent against hash collision attacks. Throwing away the offset basis completely could lead to some non-uniformity, so instead we are now XORing the seed and the algorithm-defined offset basis as the new offset basis to use which should rectify this. In the current c-ares use cases, this will probably have little to no impact, but future hash table uses may benefit from the better distribution. Authored-By: Brad House (@bradh352)pull/863/head
parent
9533298810
commit
5b70955d51
1 changed files with 4 additions and 6 deletions
Loading…
Reference in new issue