Uh oh!
There was an error while loading. Please reload this page.
crypto: clarify require("crypto").getRandomValues is Node.js specific - #41782
Conversation
nodejs-github-bot
commented
Jan 31, 2022
Review requested:
|
Uh oh!
There was an error while loading. Please reload this page.
aduh95
commented
Feb 2, 2022
@jasnell could you help us here? It seems there is a confusion on what is the plan for exposing a
If it's the latter, then I guess we should land this PR, as well as #41760, but this would need your input to move forward. |
jasnell
commented
Feb 2, 2022
My preference is exposing |
aduh95
commented
Feb 2, 2022
This is going to create all sort of compatibility problems (I've been myself affected by #41760), I'm -1 on this idea. Adding it to the TSC agenda so we can discuss this further. |
I suggested this when talking to @jasnell earlier, except that I'd maybe add the aliases to |
jasnell
commented
Feb 5, 2022
One possible approach we can take here is to modify Node.js' |
It wouldn't help folks doing Could you maybe explain why we wouldn't expose |
tniessen
commented
Feb 10, 2022
Yes, I think that was the motivation behind #41266 (see #41266 (comment)). |
aduh95
commented
Feb 11, 2022
FYI, I've opened #41938 to suggest exposing the Web Crypto on the global scope instead of the Node.js one. |
PR-URL: #41938 Refs: https://developer.mozilla.org/en-US/docs/Web/API/crypto_property Refs: #41782 Refs: https://w3c.github.io/webcrypto Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Filip Skokan <panva.ip@gmail.com>
tniessen
commented
Feb 16, 2022
aduh95
commented
Feb 16, 2022
I don't think we get much value from having
Whatever we decide to do we the alias, I think we should land this ASAP: all this PR is doing is documenting that the shortcut is not exactly the same as the web version, and it unblocks #41760. Currently our docs for Web crypto are "broken", for example here we tell the user to use object destructuring to get a reference to Lines 128 to 159 in b8de7aa If the user tries to use this code in a browser or Deno, it will throw an arguably quite surprising error (e.g. Chromium throws TypeError: Illegal invocation). |
mcollina
commented
Feb 16, 2022
@jasnell have you got any concerns in landing this as-is? |
Uh oh!
There was an error while loading. Please reload this page.
nodejs-github-bot
commented
Feb 19, 2022
nodejs-github-bot
commented
Feb 19, 2022
nodejs-github-bot
commented
Feb 19, 2022
nodejs-github-bot
commented
Feb 19, 2022
PR-URL: nodejs#41938 Refs: https://developer.mozilla.org/en-US/docs/Web/API/crypto_property Refs: nodejs#41782 Refs: https://w3c.github.io/webcrypto Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Filip Skokan <panva.ip@gmail.com>
PR-URL: #41938 Refs: https://developer.mozilla.org/en-US/docs/Web/API/crypto_property Refs: #41782 Refs: https://w3c.github.io/webcrypto Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Filip Skokan <panva.ip@gmail.com>
PR-URL: #41938 Refs: https://developer.mozilla.org/en-US/docs/Web/API/crypto_property Refs: #41782 Refs: https://w3c.github.io/webcrypto Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Filip Skokan <panva.ip@gmail.com>
aduh95
commented
Feb 22, 2022
Landed in 470c284 |
Refs: nodejs#41779 Refs: nodejs#41760 PR-URL: nodejs#41782 Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
danielleadams
commented
Apr 19, 2022
@aduh95 this doesn't land cleanly on v16.x-staging. Can you make a backport for this? Thank you |
PR-URL: nodejs#41938 Refs: https://developer.mozilla.org/en-US/docs/Web/API/crypto_property Refs: nodejs#41782 Refs: https://w3c.github.io/webcrypto Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Filip Skokan <panva.ip@gmail.com>
PR-URL: #41938 Refs: https://developer.mozilla.org/en-US/docs/Web/API/crypto_property Refs: #41782 Refs: https://w3c.github.io/webcrypto Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Filip Skokan <panva.ip@gmail.com>
Refs: #41779
Refs: #41760