Skip to content

Commit 504c0cd

Browse 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

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

doc/api/crypto.md

Lines changed: 6 additions & 6 deletions
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)