Skip to content
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
Typo in synchronous randomBytes example
The string template was closed after `${buf.length}` causing a syntax error within the example.
  • Loading branch information
WebReflection committed Mar 18, 2016
commit 0674ed70660276e3fd2ee7344cd7d60c0f160adc
2 changes: 1 addition & 1 deletion doc/api/crypto.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down