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 <ruben@bridgewater.de>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Fedor Indutny <fedor.indutny@gmail.com>
  • 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.