Commit acc633c7 authored by Gerhard Stoebich's avatar Gerhard Stoebich Committed by Trivikram Kamat
Browse files

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: https://github.com/nodejs/node/pull/21550


Reviewed-By: default avatarAnna Henningsen <anna@addaleax.net>
Reviewed-By: default avatarRuben Bridgewater <ruben@bridgewater.de>
Reviewed-By: default avatarJames M Snell <jasnell@gmail.com>
parent b07852d1
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment