Skip to content

Commit

Permalink
crypto: remove useless if statement
Browse files Browse the repository at this point in the history
The if statement in `ECDH.getPublicKey` is useless. This change
is to remove it.

PR-URL: #15041
Reviewed-By: Ruben Bridgewater <[email protected]>
Reviewed-By: Ben Noordhuis <[email protected]>
Reviewed-By: Fedor Indutny <[email protected]>
  • Loading branch information
starkwang authored and BridgeAR committed Oct 2, 2017
1 parent 2e215f1 commit 43e7e8d
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions lib/internal/crypto/diffiehellman.js
Original file line number Diff line number Diff line change
Expand Up @@ -191,8 +191,6 @@ ECDH.prototype.generateKeys = function generateKeys(encoding, format) {
ECDH.prototype.getPublicKey = function getPublicKey(encoding, format) {
var f;
if (format) {
if (typeof format === 'number')
f = format;
if (format === 'compressed')
f = POINT_CONVERSION_COMPRESSED;
else if (format === 'hybrid')
Expand Down

0 comments on commit 43e7e8d

Please sign in to comment.