Skip to content
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

crypto: add checkIsArrayBufferView #20251

Closed

Conversation

danbev
Copy link
Contributor

@danbev danbev commented Apr 24, 2018

This commit adds a checkIsArrayBufferView function to avoid some code
duplication in sig.js

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • commit message follows commit guidelines

This commit adds a checkIsArrayBufferView function to avoid some code
duplication in sig.js
@nodejs-github-bot nodejs-github-bot added the crypto Issues and PRs related to the crypto subsystem. label Apr 24, 2018
@danbev
Copy link
Contributor Author

danbev commented Apr 24, 2018

Copy link
Member

@bnoordhuis bnoordhuis left a comment

Choose a reason for hiding this comment

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

I was just looking at that today; you can extend it to pbkdf2.js as well.

One suggestion: I'd pass the name as the first argument, that's more consistent with other validators (I think.)

@lpinca lpinca added the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label Apr 24, 2018
@danbev
Copy link
Contributor Author

danbev commented Apr 25, 2018

I was just looking at that today; you can extend it to pbkdf2.js as well.

Ah great, I'll take a look at pbkdf2.js as well.

One suggestion: I'd pass the name as the first argument, that's more consistent with other validators (I think.)

Sounds good, I'll update that. Thanks

This commit moves checkIsArrayBufferView to crypto/util to allow it to
be used by other modules in crypto.
This commit updates pbkdf2 to use checkIsArrayBufferView from
internal/crypto/util.
@danbev
Copy link
Contributor Author

danbev commented Apr 25, 2018

@danbev
Copy link
Contributor Author

danbev commented Apr 26, 2018

Landed in fe70af9, and 2061248.

@danbev danbev closed this Apr 26, 2018
danbev added a commit that referenced this pull request Apr 26, 2018
This commit adds a checkIsArrayBufferView function to avoid some code
duplication in sig.js

PR-URL: #20251
Reviewed-By: Ben Noordhuis <[email protected]>
Reviewed-By: Joyee Cheung <[email protected]>
Reviewed-By: Tobias Nießen <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Trivikram Kamat <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Tiancheng "Timothy" Gu <[email protected]>
danbev added a commit that referenced this pull request Apr 26, 2018
This commit updates pbkdf2 to use checkIsArrayBufferView from
internal/crypto/util.

PR-URL: #20251
Reviewed-By: Ben Noordhuis <[email protected]>
Reviewed-By: Joyee Cheung <[email protected]>
Reviewed-By: Tobias Nießen <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Trivikram Kamat <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Tiancheng "Timothy" Gu <[email protected]>
@danbev danbev deleted the crypto_sig_check_is_array_buffer_view branch April 26, 2018 06:01
MylesBorins pushed a commit that referenced this pull request May 4, 2018
This commit adds a checkIsArrayBufferView function to avoid some code
duplication in sig.js

PR-URL: #20251
Reviewed-By: Ben Noordhuis <[email protected]>
Reviewed-By: Joyee Cheung <[email protected]>
Reviewed-By: Tobias Nießen <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Trivikram Kamat <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Tiancheng "Timothy" Gu <[email protected]>
MylesBorins pushed a commit that referenced this pull request May 4, 2018
This commit updates pbkdf2 to use checkIsArrayBufferView from
internal/crypto/util.

PR-URL: #20251
Reviewed-By: Ben Noordhuis <[email protected]>
Reviewed-By: Joyee Cheung <[email protected]>
Reviewed-By: Tobias Nießen <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Trivikram Kamat <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Tiancheng "Timothy" Gu <[email protected]>
@MylesBorins MylesBorins mentioned this pull request May 8, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
author ready PRs that have at least one approval, no pending requests for changes, and a CI started. crypto Issues and PRs related to the crypto subsystem.
Projects
None yet
Development

Successfully merging this pull request may close these issues.