Skip to content
This repository was archived by the owner on Oct 17, 2024. It is now read-only.

Replace right shift with truncating divide #128

Merged
merged 2 commits into from
Apr 18, 2022
Merged

Conversation

natebosch
Copy link
Contributor

Closes dart-lang/core#239

In JavaScript the shift operators cause numbers to be truncated to 32
bits, so the >> 32 operation will always result in 0 on the web. This
causes a problem once the length of the file hits 512MB.

Closes #125

In JavaScript the shift operators cause numbers to be truncated to 32
bits, so the `>> 32` operation will always result in 0 on the web. This
causes a problem once the length of the file hits 512MB.
@natebosch natebosch requested a review from rakudrama April 18, 2022 18:07
Copy link

@rakudrama rakudrama left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@natebosch natebosch merged commit 4297d24 into master Apr 18, 2022
@natebosch natebosch deleted the truncated-shift-js branch April 18, 2022 18:26
mosuem pushed a commit to dart-lang/core that referenced this pull request Oct 15, 2024
Closes dart-lang/crypto#125

In JavaScript the shift operators cause numbers to be truncated to 32
bits, so the `>> 32` operation will always result in 0 on the web. This
causes a problem once the length of the file hits 512MB.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

large files produce incorrect hash values in web
2 participants