-
Notifications
You must be signed in to change notification settings - Fork 372
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
change(rc): Update Remote Config condition evaluation hashing #2760
Conversation
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! Thank you!
} | ||
|
||
return hash64; | ||
const hex = createHash('sha256').update(seededRandomizationId).digest('hex'); |
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.
Thinking (no action req'd): we had a 64 bits hash before, so we don't need 256 bits, but sha256 is broadly available and there's no noticeable performance difference, so sha256 is fine.
|
||
// Manually negate the hash if its value is less than 0, since Math.abs doesn't | ||
// support BigInt. | ||
if (hash64 < 0) { |
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.
Thinking (no action req'd): we're now directly instantiating the bigint with the hash, rather than coercing it to behave like a 64bit signed Java long, so it will always be positive.
Update remote config condition evaluation hashing