Skip to content
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

Cleanup randomFill. NFC #23260

Merged
merged 1 commit into from
Dec 30, 2024
Merged

Conversation

sbc100
Copy link
Collaborator

@sbc100 sbc100 commented Dec 30, 2024

Under node we can rely on randomFillSync always being available since
its been around since v9.0.0:

https://nodejs.org/api/crypto.html#cryptorandomfillsyncbuffer-offset-size

Also, remove the return value from this function since it always fills
the entire buffer.

https://caniuse.com/getrandomvalues

@sbc100 sbc100 force-pushed the cleanup_randomFill branch from 86cf5c7 to 36eae7f Compare December 30, 2024 19:29
@sbc100 sbc100 changed the title Cleanup get random Cleanup randomFill Dec 30, 2024
@sbc100 sbc100 requested a review from kripken December 30, 2024 19:29
@sbc100 sbc100 changed the title Cleanup randomFill Cleanup randomFill. NFC Dec 30, 2024
@sbc100 sbc100 force-pushed the cleanup_randomFill branch 2 times, most recently from f5b5499 to 366fd05 Compare December 30, 2024 19:32
@sbc100 sbc100 requested a review from dschuff December 30, 2024 19:41
src/library_fs.js Outdated Show resolved Hide resolved
Under node we can rely on randomFillSync always being available since
its been around since v9:

https://nodejs.org/api/crypto.html#cryptorandomfillsyncbuffer-offset-size

Also, remove the return value from this function since it always fills
the entire buffer.

https://caniuse.com/getrandomvalues
@sbc100 sbc100 enabled auto-merge (squash) December 30, 2024 20:29
@sbc100 sbc100 force-pushed the cleanup_randomFill branch from 366fd05 to 541213e Compare December 30, 2024 20:29
@sbc100 sbc100 merged commit 5e3fab4 into emscripten-core:main Dec 30, 2024
26 of 29 checks passed
@sbc100 sbc100 deleted the cleanup_randomFill branch December 30, 2024 23:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants