From 0674ed70660276e3fd2ee7344cd7d60c0f160adc Mon Sep 17 00:00:00 2001 From: Andrea Giammarchi Date: Fri, 18 Mar 2016 12:22:22 +0000 Subject: [PATCH] Typo in synchronous randomBytes example The string template was closed after `${buf.length}` causing a syntax error within the example. --- doc/api/crypto.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/api/crypto.markdown b/doc/api/crypto.markdown index 56e4a4628ff5b5..294095dc16401b 100644 --- a/doc/api/crypto.markdown +++ b/doc/api/crypto.markdown @@ -1261,7 +1261,7 @@ there is a problem generating the bytes. // Synchronous const buf = crypto.randomBytes(256); console.log( - `${buf.length}` bytes of random data: ${buf.toString('hex')}); + `${buf.length} bytes of random data: ${buf.toString('hex')}`); ``` The `crypto.randomBytes()` method will block until there is sufficient entropy.