crypto: simplify diffiehellman getFormat function#20246
Closed
danbev wants to merge 3 commits intonodejs:masterfrom
Closed
crypto: simplify diffiehellman getFormat function#20246danbev wants to merge 3 commits intonodejs:masterfrom
danbev wants to merge 3 commits intonodejs:masterfrom
Conversation
This commit aims to simplify the getFormat function in diffiehellman.js.
Contributor
Author
trivikr
reviewed
Apr 24, 2018
lib/internal/crypto/diffiehellman.js
Outdated
| else if (format === 'hybrid') | ||
| f = POINT_CONVERSION_HYBRID; | ||
| return POINT_CONVERSION_HYBRID; | ||
| // Default |
Member
There was a problem hiding this comment.
Can you remove this comment or move to line 231 as POINT_CONVERSION_UNCOMPRESSED is the default?
Contributor
Author
There was a problem hiding this comment.
Ah thanks, I'll update shortly.
tniessen
approved these changes
Apr 24, 2018
BridgeAR
reviewed
Apr 24, 2018
lib/internal/crypto/diffiehellman.js
Outdated
| if (format === 'compressed') | ||
| f = POINT_CONVERSION_COMPRESSED; | ||
| return POINT_CONVERSION_COMPRESSED; | ||
| else if (format === 'hybrid') |
Member
There was a problem hiding this comment.
The else becomes obsolete here. The same for the next one.
Contributor
Author
There was a problem hiding this comment.
Good point, I missed that. Will update shortly. Thanks
Contributor
Author
trivikr
approved these changes
Apr 24, 2018
cjihrig
approved these changes
Apr 24, 2018
jasnell
approved these changes
Apr 24, 2018
Member
|
@BridgeAR Noted! 👍 |
Contributor
Author
|
Landed in 3b8ab2a. |
danbev
added a commit
to danbev/node
that referenced
this pull request
Apr 26, 2018
This commit aims to simplify the getFormat function in diffiehellman.js. PR-URL: nodejs#20246 Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
MylesBorins
pushed a commit
that referenced
this pull request
May 4, 2018
This commit aims to simplify the getFormat function in diffiehellman.js. PR-URL: #20246 Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Merged
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
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This commit aims to simplify the getFormat function in
diffiehellman.js.
Checklist
make -j4 test(UNIX), orvcbuild test(Windows) passes