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

Update & fix nodejs data for Crypto #24979

Merged
merged 7 commits into from
Dec 17, 2024
Merged

Conversation

skyclouds2001
Copy link
Contributor

@skyclouds2001 skyclouds2001 commented Nov 6, 2024

Summary

The support for the Web Crypto API is:

in v15.0.0, the API has been shipped, but can't access globally, access via the crypto module with the alternative name webcrypto via nodejs/node#35093

in v17.6.0, v16.15.0, the API can be available to global context, but need to be enabled with --experimental-global-webcrypto CLI flag via nodejs/node#41938

in v19.0.0, the API is available to global context without flags, but can be disabled with --no-experimental-global-webcrypto CLI flag via nodejs/node#42083

in v23.0.0, the API is marked as not experimental via nodejs/node#52564

See also:

https://nodejs.org/docs/latest/api/globals.html#crypto
https://nodejs.org/docs/latest/api/webcrypto.html#class-crypto
https://nodejs.org/docs/latest/api/crypto.html#cryptorandomuuidoptions
https://nodejs.org/docs/latest/api/crypto.html#cryptogetrandomvaluestypedarray

Also fixes #23784

Also note that the fix in #21414 and the test in #20752 is not correct, as the issue and PR use the link of the getRandomValues() method of crypto module (which says v17.4.0), NOT the getRandomValues() method of Web Crypto API (which says v15.0.0). Also notice that, the getRandomValues() method of crypto module is simply a convenient alias of the getRandomValues() method of Web Crypto API

Test results and supporting details

image
image

Related issues

@github-actions github-actions bot added the data:api Compat data for Web APIs. https://developer.mozilla.org/docs/Web/API label Nov 6, 2024
@skyclouds2001 skyclouds2001 marked this pull request as ready for review November 6, 2024 21:38
api/Crypto.json Outdated Show resolved Hide resolved
api/Crypto.json Outdated Show resolved Hide resolved
api/Crypto.json Show resolved Hide resolved
@caugner caugner added the nodejs Data about Node.js label Nov 12, 2024
caugner and others added 2 commits November 12, 2024 22:29
Co-authored-by: Claas Augner <495429+caugner@users.noreply.github.com>
@github-actions github-actions bot added the merge conflicts 🚧 This PR needs to merge latest "main" branch to resolve a merge conflict or other issue. label Nov 18, 2024
Copy link

This pull request has merge conflicts that must be resolved before it can be merged.

@github-actions github-actions bot added merge conflicts 🚧 This PR needs to merge latest "main" branch to resolve a merge conflict or other issue. and removed merge conflicts 🚧 This PR needs to merge latest "main" branch to resolve a merge conflict or other issue. labels Nov 18, 2024
Copy link

This pull request has merge conflicts that must be resolved before it can be merged.

Copy link
Contributor

@caugner caugner left a comment

Choose a reason for hiding this comment

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

Please have a look at the merge conflict.

@github-actions github-actions bot added size:m [PR only] 25-100 LoC changed and removed merge conflicts 🚧 This PR needs to merge latest "main" branch to resolve a merge conflict or other issue. labels Nov 22, 2024
api/Crypto.json Outdated Show resolved Hide resolved
api/Crypto.json Outdated Show resolved Hide resolved
Co-authored-by: Queen Vinyl Da.i'gyu-Kazotetsu <vinyldarkscratch@gmail.com>
@queengooborg queengooborg merged commit 8f7c3a7 into mdn:main Dec 17, 2024
9 checks passed
@skyclouds2001 skyclouds2001 deleted the node-crypto branch December 17, 2024 10:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
data:api Compat data for Web APIs. https://developer.mozilla.org/docs/Web/API nodejs Data about Node.js size:m [PR only] 25-100 LoC changed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

api.Crypto.randomUUID - available in NodeJS 18
3 participants