Commit 34300aa
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 <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: James M Snell <[email protected]>1 parent 6622ac7 commit 34300aa
1 file changed
+13
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2044 | 2044 | | |
2045 | 2045 | | |
2046 | 2046 | | |
2047 | | - | |
| 2047 | + | |
2048 | 2048 | | |
2049 | 2049 | | |
2050 | 2050 | | |
| |||
2064 | 2064 | | |
2065 | 2065 | | |
2066 | 2066 | | |
2067 | | - | |
| 2067 | + | |
| 2068 | + | |
2068 | 2069 | | |
2069 | 2070 | | |
2070 | | - | |
| 2071 | + | |
| 2072 | + | |
2071 | 2073 | | |
2072 | 2074 | | |
2073 | | - | |
| 2075 | + | |
| 2076 | + | |
2074 | 2077 | | |
2075 | 2078 | | |
2076 | 2079 | | |
| |||
2118 | 2121 | | |
2119 | 2122 | | |
2120 | 2123 | | |
2121 | | - | |
| 2124 | + | |
| 2125 | + | |
2122 | 2126 | | |
2123 | 2127 | | |
2124 | 2128 | | |
2125 | 2129 | | |
2126 | 2130 | | |
2127 | | - | |
| 2131 | + | |
| 2132 | + | |
2128 | 2133 | | |
2129 | 2134 | | |
2130 | 2135 | | |
2131 | 2136 | | |
2132 | 2137 | | |
2133 | | - | |
| 2138 | + | |
| 2139 | + | |
2134 | 2140 | | |
2135 | 2141 | | |
2136 | 2142 | | |
| |||
0 commit comments