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

docs: more explicit crypto.pseudoRandomBytes information #545

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 3 additions & 7 deletions doc/api/crypto.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -654,13 +654,9 @@ are drained.

## crypto.pseudoRandomBytes(size[, callback])

Generates *non*-cryptographically strong pseudo-random data. The data
returned will be unique if it is sufficiently long, but is not
necessarily unpredictable. For this reason, the output of this
function should never be used where unpredictability is important,
such as in the generation of encryption keys.

Usage is otherwise identical to `crypto.randomBytes`.
Identical to `crypto.randomBytes` except that, instead of throwing an error when
there is not enough accumulated entropy to generate cryptographically strong data,
it will silently return **non**-cryptographically strong data.

## Class: Certificate

Expand Down