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

crypto.pseudoRandomBytes was deprecated and now uses randomBytes under the hood #280

Closed
silkentrance opened this issue Aug 26, 2022 · 1 comment · May be fixed by #281
Closed

crypto.pseudoRandomBytes was deprecated and now uses randomBytes under the hood #280

silkentrance opened this issue Aug 26, 2022 · 1 comment · May be fixed by #281

Comments

@silkentrance
Copy link
Collaborator

Operating System

  • [ x ] all

NodeJS Version

  • [ x ] 12.x +

Tmp Version

0.2.1+

Problem

  • pseudoRandomBytes was deprecated and is no longer documented in the official API docs.
  • pseudoRandomBytes uses randomBytes under the hood

On a newly booted system, the entropy pool of the system may be empty and will not give us the amount of random bytes that we need to generate random names.

This will cause randomBytes to throw an error, or, in case of the async interface, to return an error instead.

In either case, we must compensate for this and implement our own pseudoRandomBytes function, similar to what tmp did before the introduction of crypto.

See also

@silkentrance
Copy link
Collaborator Author

closing since this is a no-op

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant