-
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
Conversation
crypto.randomFillSync - update for JS example crypto.scrypt, crypto.scryptSync - update for options description
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.
Thank you! Just some tiny nits.
doc/api/crypto.md
Outdated
@@ -2149,12 +2149,10 @@ added: v10.5.0 | |||
- `salt` {string|Buffer|TypedArray} | |||
- `keylen` {number} | |||
- `options` {Object} | |||
- `N` {number} CPU/memory cost parameter. Must be a power of two greater | |||
than one. **Default:** `16384`. | |||
- `N` {number} CPU/memory cost parameter. Must be a power of two greater than one. **Default:** `16384`. |
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.
Please, wrap long lines at 80 characters or less. Just align with the first list item character, like this:
- `N` {number} CPU/memory cost parameter. Must be a power of two greater than
one. **Default:** `16384`.
doc/api/crypto.md
Outdated
- `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`. | ||
- `maxmem` {number} Memory upper bound. It is an error when (approximately) `128*N*r > maxmem` **Default:** `32 * 1024 * 1024`. |
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.
The same)
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.
Maybe `128*N*r
-> `128 * N * r
for better readability?
doc/api/crypto.md
Outdated
@@ -2195,12 +2193,10 @@ added: v10.5.0 | |||
- `salt` {string|Buffer|TypedArray} | |||
- `keylen` {number} | |||
- `options` {Object} | |||
- `N` {number} CPU/memory cost parameter. Must be a power of two greater | |||
than one. **Default:** `16384`. | |||
- `N` {number} CPU/memory cost parameter. Must be a power of two greater than one. **Default:** `16384`. |
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.
The same re wrapping.
doc/api/crypto.md
Outdated
- `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`. | ||
- `maxmem` {number} Memory upper bound. It is an error when (approximately) `128*N*r > maxmem` **Default:** `32 * 1024 * 1024`. |
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.
The same re wrapping and spaces.
crypto.scrypt, crypto.scryptSync - update for formatting
Done. Please check it. |
@@ -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`. |
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:
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.
Just two nits that can be addressed on landing if it is not convenient to fix them now)
doc/api/crypto.md
Outdated
- `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 comment
The 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 maxmem`
and **Default:**
. Can you add it since we are already here?)
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.
@vsemozhetbyt "it seems we lack the period between maxmem
and **Default:**
" What do you mean on "period" word? Could you please write an example?
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.
Sorry for the ambiguity) I mean we need this fix:
maxmem`. **Default:**
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.
I see. Sure.
doc/api/crypto.md
Outdated
- `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 comment
The reason will be displayed to describe this comment to others. Learn more.
Ditto)
crypto.scrypt, crypto.scryptSync - added dot symbol
Please re-check it. |
PR-URL: #21500 Reviewed-By: Vse Mozhet Byt <[email protected]> Reviewed-By: Trivikram Kamat <[email protected]> Reviewed-By: Tobias Nießen <[email protected]>
Landed in 02fd93d |
PR-URL: #21500 Reviewed-By: Vse Mozhet Byt <[email protected]> Reviewed-By: Trivikram Kamat <[email protected]> Reviewed-By: Tobias Nießen <[email protected]>
Description:
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passes