-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
update ahash and hashbrown #8623
update ahash and hashbrown #8623
Conversation
AHasher::new_with_keys(42, 23) | ||
RandomState::with_seeds(42, 23, 13, 8).build_hasher() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is possible those seeds are not very secure. But then they weren't before, so...
AHasher::new_with_keys( | ||
0b1001010111101110000001001100010000000011001001101011001001111000, | ||
0b1100111101101011011110001011010100000100001111100011010011010101, | ||
RandomState::with_seeds( | ||
0b10010101111011100000010011000100, | ||
0b00000011001001101011001001111000, | ||
0b11001111011010110111100010110101, | ||
0b00000100001111100011010011010101, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for those seeds, I split the previous two values into the now required four
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM otherwise.
Objective
ahash
andhashbrown
Solution
This is a breaking change because we were creating two fixed hashers with
AHasher::new_with_keys
, which was a method that existed only for testing purpose and has been removed from public.I replaced it with
RandomState::with_seeds
which is the proper way to get a fixed hasher (see this table). This means that hashes won't be the same across versionsMigration Guide