Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 504c0cd

Browse filesBrowse files
Victor Belozyorovtargos
authored andcommitted
doc: fix code example and formatting in crypto.md
PR-URL: #21500 Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de>
1 parent 2e07d45 commit 504c0cd
Copy full SHA for 504c0cd

File tree

Expand file treeCollapse file tree

1 file changed

+6
-6
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+6
-6
lines changed
Open diff view settings
Collapse file

‎doc/api/crypto.md‎

Copy file name to clipboardExpand all lines: doc/api/crypto.md
+6-6Lines changed: 6 additions & 6 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -2067,10 +2067,10 @@ const a = new Uint32Array(10);
20672067
console.log(crypto.randomFillSync(a).toString('hex'));
20682068

20692069
const b = new Float64Array(10);
2070-
console.log(crypto.randomFillSync(a).toString('hex'));
2070+
console.log(crypto.randomFillSync(b).toString('hex'));
20712071

20722072
const c = new DataView(new ArrayBuffer(10));
2073-
console.log(crypto.randomFillSync(a).toString('hex'));
2073+
console.log(crypto.randomFillSync(c).toString('hex'));
20742074
```
20752075

20762076
### crypto.randomFill(buffer[, offset][, size], callback)
@@ -2152,11 +2152,11 @@ added: v10.5.0
21522152
- `keylen` {number}
21532153
- `options` {Object}
21542154
- `N` {number} CPU/memory cost parameter. Must be a power of two greater
2155-
than one. **Default:** `16384`.
2155+
than one. **Default:** `16384`.
21562156
- `r` {number} Block size parameter. **Default:** `8`.
21572157
- `p` {number} Parallelization parameter. **Default:** `1`.
21582158
- `maxmem` {number} Memory upper bound. It is an error when (approximately)
2159-
`128*N*r > maxmem` **Default:** `32 * 1024 * 1024`.
2159+
`128 * N * r > maxmem`. **Default:** `32 * 1024 * 1024`.
21602160
- `callback` {Function}
21612161
- `err` {Error}
21622162
- `derivedKey` {Buffer}
@@ -2198,11 +2198,11 @@ added: v10.5.0
21982198
- `keylen` {number}
21992199
- `options` {Object}
22002200
- `N` {number} CPU/memory cost parameter. Must be a power of two greater
2201-
than one. **Default:** `16384`.
2201+
than one. **Default:** `16384`.
22022202
- `r` {number} Block size parameter. **Default:** `8`.
22032203
- `p` {number} Parallelization parameter. **Default:** `1`.
22042204
- `maxmem` {number} Memory upper bound. It is an error when (approximately)
2205-
`128*N*r > maxmem` **Default:** `32 * 1024 * 1024`.
2205+
`128 * N * r > maxmem`. **Default:** `32 * 1024 * 1024`.
22062206
- Returns: {Buffer}
22072207

22082208
Provides a synchronous [scrypt][] implementation. Scrypt is a password-based

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.