FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

crypto: synchronise with doc by refack · Pull Request #14805 · nodejs/node · GitHub

/ node Public

crypto: synchronise with doc - #14805

Closed
refack wants to merge 4 commits into
nodejs:masterfrom
refack:crypo-doc-buf
Closed

crypto: synchronise with doc#14805
refack wants to merge 4 commits into
nodejs:masterfrom
refack:crypo-doc-buf

Conversation

refack commented Aug 13, 2017
edited
Loading

Copy link
Copy Markdown
Contributor

Fixes: #14800

  • Improve description of formal args in doc
  • Rename formal arguments to match doc
  • Merge rsa binding factories
Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • documentation is changed or added
  • commit message follows commit guidelines
Affected core subsystem(s)

crypto,doc

nodejs-github-bot added the crypto Issues and PRs related to the crypto subsystem. label Aug 13, 2017

refack commented Aug 13, 2017

Copy link
Copy Markdown
Contributor Author

refack commented Aug 13, 2017

Copy link
Copy Markdown
Contributor Author

/cc @nodejs/documentation @nodejs/crypto

refack commented Aug 13, 2017

Copy link
Copy Markdown
Contributor Author

Comment thread lib/crypto.js Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Why was this changed to a more generic name?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

To sync with the docs - https://nodejs.org/api/crypto.html#crypto_hash_digest_encoding

### hash.digest([encoding])

Changing the docs causes the hrefs to change

mscdex commented Aug 13, 2017

Copy link
Copy Markdown
Contributor

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.

Comment thread lib/crypto.js Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

options seemed like the better name here?

Comment thread lib/crypto.js Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

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.

Comment thread lib/crypto.js Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

This TypeError gets really weird now.

Also, if anything, engineID is probably better.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

I know, there is at least another place like this.
I'll do the migration to internal/errors and fix these.

refack added the doc Issues and PRs related to the documentations. label Aug 13, 2017

refack commented Aug 13, 2017

Copy link
Copy Markdown
Contributor Author

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.

The reasoning to synchronize is to help with debugging, where you are exposed the "internal" arguments' names.
In order not to break the docs linking I synchronized in one direction doc -> js.

Copy link
Copy Markdown
Member

@refack It’s okay to break links in the documentation so long as it’s updated throughout our docs.

refack commented Aug 13, 2017

Copy link
Copy Markdown
Contributor Author

@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 semver-major.

Comment thread doc/api/crypto.md Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

This change has to be done in the list below the paragraph. All the options are explained there.

Copy link
Copy Markdown
Member

Ping @refack

Comment thread doc/api/crypto.md
description: Support for RSASSA-PSS and additional options was added.
-->
- `privateKey` {string | Object}
- `key` {string}

refack Sep 13, 2017
edited
Loading

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Description of Object case in second paragraph L988

refack commented Sep 13, 2017

Copy link
Copy Markdown
Contributor Author

@mscdex @addaleax @thefourtheye addressed comments PTAL

Comment thread doc/api/crypto.md
added: v0.11.8
-->
- `spkac` {string | Buffer | TypedArray | DataView}
- `encoding` {string} (Default `utf-8`) used to encode the `spkac` into a Buffer

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

For string literal values, single quotes should be added inside the backticks: `'utf-8'`

Comment thread doc/api/crypto.md
added: v0.11.8
-->
- `spkac` {string | Buffer | TypedArray | DataView}
- `encoding` {string} (Default `utf-8`) used to encode the `spkac` into a Buffer

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Ditto

Comment thread doc/api/crypto.md
added: v0.7.1
-->
- `autoPadding` {boolean} Defaults to `true`.
- `autoPadding` {boolean} (Default `true`).

mscdex Sep 14, 2017
edited
Loading

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

If we're going to switch these, we should do so consistently. There are other instances in this document.

mscdex commented Sep 14, 2017

Copy link
Copy Markdown
Contributor

My comment about changing the code still stands.

addaleax left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

@refack Thank you!

Copy link
Copy Markdown
Member

@refack Re: the code changes, it might be better to contribute that into #15231 than to do it in this PR

BridgeAR left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

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).

Copy link
Copy Markdown
Member

This needs a rebase. I think the doc changes could land soon otherwise.

refack self-assigned this Sep 23, 2017

Copy link
Copy Markdown
Member

Ping @refack

Copy link
Copy Markdown
Member

Closing due to long inactivity. @refack please feel free to reopen if you want to further pursue this!

BridgeAR closed this Nov 22, 2017
refack deleted the crypo-doc-buf branch September 5, 2018 22:30
refack removed their assignment Oct 12, 2018
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

crypto Issues and PRs related to the crypto subsystem. doc Issues and PRs related to the documentations.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

password and salt parameter allows both string and buffer, but the doc only says string

6 participants


Back | FazBrowse Home | New Git URL