doc: correctly reference where to list hash algorithms.#9043
doc: correctly reference where to list hash algorithms.#9043sstern6 wants to merge 1 commit intonodejs:masterfrom
Conversation
doc/api/crypto.md
Outdated
There was a problem hiding this comment.
Nit: line wrap at 80 chars please :-)
There was a problem hiding this comment.
If we go with this approach, it would be best to make crypto.getHashes() a link to the right location.
There was a problem hiding this comment.
Will get on this, thanks for the feedback
There was a problem hiding this comment.
Using reference makes it sound like you should refer to the documentation for crypto.getHashes() but what is really meant is to run it to obtain the array of available algorithms, right? If so, instead of this:
For available signing algorithms, please reference
crypto.getHashes().
...I'd prefer something like:
Use [
crypto.getHashes()][] to obtain an array of names of the available signing algorithms.
There was a problem hiding this comment.
@jasnell for linking to crypto.getHashes() would you reccomend putting a <a id="getHashes"></a> above crypto.getHashes() in the markdown, or do you have another preferred method?
Thanks
There was a problem hiding this comment.
There was a problem hiding this comment.
@sstern6 Some more info: That linking style is used throughout the doc and all (or nearly all) our other API docs. You can read about it at https://daringfireball.net/projects/markdown/syntax#link if you search for implicit link name shortcut.
There was a problem hiding this comment.
thanks @Trott getting to that now. The link is already declared at the bottom of the page.
Updating the PR with all of the comments
doc/api/crypto.md
Outdated
There was a problem hiding this comment.
The added text is a sentence fragment (which is fine for the first "sentence", but subsequent statements should be complete sentences). It seems unnecessary anyway. If we do want to include the example, I'd prefer:
Returns an array with the names of the supported hash algorithms, such as
RSA-SHA256.
doc/api/crypto.md
Outdated
There was a problem hiding this comment.
Using reference makes it sound like you should refer to the documentation for crypto.getHashes() but what is really meant is to run it to obtain the array of available algorithms, right? If so, instead of this:
For available signing algorithms, please reference
crypto.getHashes().
...I'd prefer something like:
Use [
crypto.getHashes()][] to obtain an array of names of the available signing algorithms.
|
@sstern6 can you please adjust the commit message to make it follow the guidelines? Thank you. |
|
Thanks everyone, will have all of these addressed by end of day. |
287e57d to
09162f8
Compare
doc/api/crypto.md
Outdated
There was a problem hiding this comment.
Micro-nit: array with the names -> array of the names
|
@Trott will have the micronit fixed by 4:30pst today. Thanks |
PR-URL: #9043 Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Rich Trott <[email protected]>
|
Landed in 3d294cf. Thank you! |
PR-URL: #9043 Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Rich Trott <[email protected]>
PR-URL: #9043 Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Rich Trott <[email protected]>
PR-URL: #9043 Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Rich Trott <[email protected]>
Checklist
make -j8 test(UNIX), orvcbuild test nosign(Windows) passesAffected core subsystem(s)
Docs.
Description of change
Fixes Issue: #9005.
Update crypto docs by removing inaccurate command explanation from
crypto.createSign(algorithm)andcrypto.createVerify(algorithm),accurately referencing how to get available hash algorithms from
crypto.getHashes().