Commit acc633c
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 b07852d commit acc633c
1 file changed
Lines changed: 13 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2035 | 2035 | | |
2036 | 2036 | | |
2037 | 2037 | | |
2038 | | - | |
| 2038 | + | |
2039 | 2039 | | |
2040 | 2040 | | |
2041 | 2041 | | |
| |||
2055 | 2055 | | |
2056 | 2056 | | |
2057 | 2057 | | |
2058 | | - | |
| 2058 | + | |
| 2059 | + | |
2059 | 2060 | | |
2060 | 2061 | | |
2061 | | - | |
| 2062 | + | |
| 2063 | + | |
2062 | 2064 | | |
2063 | 2065 | | |
2064 | | - | |
| 2066 | + | |
| 2067 | + | |
2065 | 2068 | | |
2066 | 2069 | | |
2067 | 2070 | | |
| |||
2109 | 2112 | | |
2110 | 2113 | | |
2111 | 2114 | | |
2112 | | - | |
| 2115 | + | |
| 2116 | + | |
2113 | 2117 | | |
2114 | 2118 | | |
2115 | 2119 | | |
2116 | 2120 | | |
2117 | 2121 | | |
2118 | | - | |
| 2122 | + | |
| 2123 | + | |
2119 | 2124 | | |
2120 | 2125 | | |
2121 | 2126 | | |
2122 | 2127 | | |
2123 | 2128 | | |
2124 | | - | |
| 2129 | + | |
| 2130 | + | |
2125 | 2131 | | |
2126 | 2132 | | |
2127 | 2133 | | |
| |||
0 commit comments