Conversation
|
/cc @nodejs/documentation @nodejs/crypto |
|
Quick recheck: https://ci.nodejs.org/job/node-test-commit-linuxone/7934/ |
lib/crypto.js
Outdated
There was a problem hiding this comment.
Why was this changed to a more generic name?
There was a problem hiding this comment.
To sync with the docs - https://nodejs.org/api/crypto.html#crypto_hash_digest_encoding
Line 783 in 2e7ccc2
Changing the docs causes the
hrefs to change
|
I'm not sure most of these changes are worth it. It's not necessary to ensure the documentation parameter names exactly match what are used internally. |
lib/crypto.js
Outdated
There was a problem hiding this comment.
options seemed like the better name here?
lib/crypto.js
Outdated
There was a problem hiding this comment.
Um … “binder”?
Elsewhere in the code we name these things makeFoo, so you could call it makeRSAMethod or so if you at set on wanting to change the names.
lib/crypto.js
Outdated
There was a problem hiding this comment.
This TypeError gets really weird now.
Also, if anything, engineID is probably better.
There was a problem hiding this comment.
I know, there is at least another place like this.
I'll do the migration to internal/errors and fix these.
The reasoning to synchronize is to help with debugging, where you are exposed the "internal" arguments' names. |
|
@refack It’s okay to break links in the documentation so long as it’s updated throughout our docs. |
It's more delicate work. I'll give it another look if there are places where it's obviously better to break the docs. Also it breaks "permalinks" that might be embedded in other sites, so the change should really be worth it and I'd even categorize it |
doc/api/crypto.md
Outdated
There was a problem hiding this comment.
This change has to be done in the list below the paragraph. All the options are explained there.
|
Ping @refack |
f676054 to
8d8f61c
Compare
8d8f61c to
4f24fe1
Compare
| description: Support for RSASSA-PSS and additional options was added. | ||
| --> | ||
| - `privateKey` {string | Object} | ||
| - `key` {string} |
There was a problem hiding this comment.
Description of Object case in second paragraph L988
|
@mscdex @addaleax @thefourtheye addressed comments PTAL |
| added: v0.11.8 | ||
| --> | ||
| - `spkac` {string | Buffer | TypedArray | DataView} | ||
| - `encoding` {string} (Default `utf-8`) used to encode the `spkac` into a Buffer |
There was a problem hiding this comment.
For string literal values, single quotes should be added inside the backticks: `'utf-8'`
| added: v0.11.8 | ||
| --> | ||
| - `spkac` {string | Buffer | TypedArray | DataView} | ||
| - `encoding` {string} (Default `utf-8`) used to encode the `spkac` into a Buffer |
| added: v0.7.1 | ||
| --> | ||
| - `autoPadding` {boolean} Defaults to `true`. | ||
| - `autoPadding` {boolean} (Default `true`). |
There was a problem hiding this comment.
If we're going to switch these, we should do so consistently. There are other instances in this document.
|
My comment about changing the code still stands. |
BridgeAR
left a comment
There was a problem hiding this comment.
The doc changes LGTM but I would also prefer not to include the changes in crypto (besides the consolidation of the rsaPublic and rsaPrivate functions).
|
This needs a rebase. I think the doc changes could land soon otherwise. |
|
Ping @refack |
|
Closing due to long inactivity. @refack please feel free to reopen if you want to further pursue this! |
Fixes: #14800
Checklist
make -j4 test(UNIX), orvcbuild test(Windows) passesAffected core subsystem(s)
crypto,doc