diff options
author | Victor Belozyorov <hi@vbelozyorov.com> | 2018-06-24 09:30:52 +0200 |
---|---|---|
committer | Vse Mozhet Byt <vsemozhetbyt@gmail.com> | 2018-06-27 20:33:27 +0300 |
commit | 02fd93d91a3a5e29ab42d812fdab46ec61a07830 (patch) | |
tree | 3a8e64b759e8d8998067430be88a8ab3b5662840 /doc/api/crypto.md | |
parent | 7ff50f9e9cf5459c60f10f3919e79223c8b7446c (diff) | |
download | android-node-v8-02fd93d91a3a5e29ab42d812fdab46ec61a07830.tar.gz android-node-v8-02fd93d91a3a5e29ab42d812fdab46ec61a07830.tar.bz2 android-node-v8-02fd93d91a3a5e29ab42d812fdab46ec61a07830.zip |
doc: fix code example and formatting in crypto.md
PR-URL: https://github.com/nodejs/node/pull/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>
Diffstat (limited to 'doc/api/crypto.md')
-rw-r--r-- | doc/api/crypto.md | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/doc/api/crypto.md b/doc/api/crypto.md index 525efc01b8..519a17aece 100644 --- a/doc/api/crypto.md +++ b/doc/api/crypto.md @@ -2064,10 +2064,10 @@ const a = new Uint32Array(10); console.log(crypto.randomFillSync(a).toString('hex')); const b = new Float64Array(10); -console.log(crypto.randomFillSync(a).toString('hex')); +console.log(crypto.randomFillSync(b).toString('hex')); const c = new DataView(new ArrayBuffer(10)); -console.log(crypto.randomFillSync(a).toString('hex')); +console.log(crypto.randomFillSync(c).toString('hex')); ``` ### crypto.randomFill(buffer[, offset][, size], callback) @@ -2149,11 +2149,11 @@ added: v10.5.0 - `keylen` {number} - `options` {Object} - `N` {number} CPU/memory cost parameter. Must be a power of two greater - than one. **Default:** `16384`. + than one. **Default:** `16384`. - `r` {number} Block size parameter. **Default:** `8`. - `p` {number} Parallelization parameter. **Default:** `1`. - `maxmem` {number} Memory upper bound. It is an error when (approximately) - `128*N*r > maxmem` **Default:** `32 * 1024 * 1024`. + `128 * N * r > maxmem`. **Default:** `32 * 1024 * 1024`. - `callback` {Function} - `err` {Error} - `derivedKey` {Buffer} @@ -2195,11 +2195,11 @@ added: v10.5.0 - `keylen` {number} - `options` {Object} - `N` {number} CPU/memory cost parameter. Must be a power of two greater - than one. **Default:** `16384`. + than one. **Default:** `16384`. - `r` {number} Block size parameter. **Default:** `8`. - `p` {number} Parallelization parameter. **Default:** `1`. - `maxmem` {number} Memory upper bound. It is an error when (approximately) - `128*N*r > maxmem` **Default:** `32 * 1024 * 1024`. + `128 * N * r > maxmem`. **Default:** `32 * 1024 * 1024`. - Returns: {Buffer} Provides a synchronous [scrypt][] implementation. Scrypt is a password-based |