Browse Source

crypto: remove useless if statement

The if statement in `ECDH.getPublicKey` is useless. This change
is to remove it.

PR-URL: https://github.com/nodejs/node/pull/15041
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Fedor Indutny <fedor.indutny@gmail.com>
v9.x-staging
Weijia Wang 8 years ago
committed by Ruben Bridgewater
parent
commit
43e7e8d106
No known key found for this signature in database GPG Key ID: F07496B3EB3C1762
  1. 2
      lib/internal/crypto/diffiehellman.js

2
lib/internal/crypto/diffiehellman.js

@ -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')

Loading…
Cancel
Save