-
Notifications
You must be signed in to change notification settings - Fork 139
refactor: make hash random #2783
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
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
remove |
6bc416a
to
e070786
Compare
Pull Request Test Coverage Report for Build 1429Details
💛 - Coveralls |
e070786
to
0a93fee
Compare
@quake Would you like to review this PR? |
quake
approved these changes
Sep 29, 2025
LGTM |
This reverts commit 61d0e3e.
0a93fee
to
89e3932
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR makes the hash seed random on JavaScript backend, and cleanup the relevant tests.
This PR is broken into two steps:
key.hash()
toHasher::new()..combine(key).finalize()
. This is to make sure that the hash values are computed based on the hash combine with a seed, which is fixed at this stage. The tests based on the specific hash values are cleaned up.seed
inHasher::new()
random for JS backend. It will usecrypto.getRandomValue
if possible, and fallback toMath.random
. The tests based on the fixed hash computations are cleaned up.