-
Notifications
You must be signed in to change notification settings - Fork 30.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update for crypto.md #21500
Update for crypto.md #21500
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2065,10 +2065,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) | ||
|
@@ -2150,11 +2150,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`. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sorry for not spotting this first time: it seems we lack the period between There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @vsemozhetbyt "it seems we lack the period between There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sorry for the ambiguity) I mean we need this fix:
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I see. Sure. |
||
- `callback` {Function} | ||
- `err` {Error} | ||
- `derivedKey` {Buffer} | ||
|
@@ -2196,11 +2196,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`. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ditto) |
||
- Returns: {Buffer} | ||
|
||
Provides a synchronous [scrypt][] implementation. Scrypt is a password-based | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we prefer this style @vsemozhetbyt? Seems like the current style causes issues when converted to HTML?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, the extra indentation produces false code blocks in HTML (not sure if this is per Markdown spec or just a quirk of
marked
we use in md-2-HTML conversion). See in the last nightly docs:https://nodejs.org/download/nightly/v11.0.0-nightly201806268836a0d780/docs/api/crypto.html#crypto_crypto_scrypt_password_salt_keylen_options_callback