doc: correct crypto.randomFill() and randomFillSync() · nodejs/node@34300aa · GitHub
Skip to content

Commit 34300aa

Browse files
Flarnatargos
authored andcommitted
doc: correct crypto.randomFill() and randomFillSync()
Correct return type of `crypto.randomFillSync()` which is of same type as passed as `buffer` argument. Correct samples for `randomFill()` and `randomFillSync()` using a `TypeArray` or `DataView` as these types don't support `.toString(encoding)`. PR-URL: #21550 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: James M Snell <jasnell@gmail.com>
1 parent 6622ac7 commit 34300aa

1 file changed

Lines changed: 13 additions & 7 deletions

File tree

doc/api/crypto.md

Lines changed: 13 additions & 7 deletions

0 commit comments

Comments
 (0)