aboutsummaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorSam Roberts <vieuxtech@gmail.com>2017-08-23 14:04:33 -0700
committerSam Roberts <vieuxtech@gmail.com>2017-08-25 10:06:02 -0700
commit68321b5cb0078e2964150772486be338011e5711 (patch)
treeebfd1aee9992f9411d17fc1543ba35d1fdc317e7 /doc
parent7efb8f7619100973877c660d0ee527ea3d92de8d (diff)
downloadandroid-node-v8-68321b5cb0078e2964150772486be338011e5711.tar.gz
android-node-v8-68321b5cb0078e2964150772486be338011e5711.tar.bz2
android-node-v8-68321b5cb0078e2964150772486be338011e5711.zip
doc: crypto.randomBytes does not block when async
It may not return random bytes right away, but when called asynchronously it will not block. PR-URL: https://github.com/nodejs/node/pull/14993 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Diffstat (limited to 'doc')
-rw-r--r--doc/api/crypto.md3
1 files changed, 2 insertions, 1 deletions
diff --git a/doc/api/crypto.md b/doc/api/crypto.md
index 56c196ed23..2f981e1ffe 100644
--- a/doc/api/crypto.md
+++ b/doc/api/crypto.md
@@ -1717,7 +1717,8 @@ console.log(
`${buf.length} bytes of random data: ${buf.toString('hex')}`);
```
-The `crypto.randomBytes()` method will block until there is sufficient entropy.
+The `crypto.randomBytes()` method will not complete until there is
+sufficient entropy available.
This should normally never take longer than a few milliseconds. The only time
when generating the random bytes may conceivably block for a longer period of
time is right after boot, when the whole system is still low on entropy.