From 504c0cdd01225c0bdb38c21e4128ea95554acf06 Mon Sep 17 00:00:00 2001 From: Victor Belozyorov Date: Sun, 24 Jun 2018 09:30:52 +0200 Subject: [PATCH] doc: fix code example and formatting in crypto.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PR-URL: https://github.com/nodejs/node/pull/21500 Reviewed-By: Vse Mozhet Byt Reviewed-By: Trivikram Kamat Reviewed-By: Tobias Nießen --- doc/api/crypto.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/doc/api/crypto.md b/doc/api/crypto.md index d5335c21969c7e..9076750c95b61a 100644 --- a/doc/api/crypto.md +++ b/doc/api/crypto.md @@ -2067,10 +2067,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) @@ -2152,11 +2152,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} @@ -2198,11 +2198,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