diff options
author | Bryan English <bryan@bryanenglish.com> | 2016-08-19 13:56:58 -0700 |
---|---|---|
committer | Bryan English <bryan@bryanenglish.com> | 2017-09-27 13:42:30 -0700 |
commit | 26174fcfe1992f256b78f8053a1f2b02e545d4b1 (patch) | |
tree | 86cf7d6d7194e5da5246a777d9a31e6f2af2bd21 /lib/crypto.js | |
parent | 611a648c668ed3a8f80837dfb46043c50848fee3 (diff) | |
download | android-node-v8-26174fcfe1992f256b78f8053a1f2b02e545d4b1.tar.gz android-node-v8-26174fcfe1992f256b78f8053a1f2b02e545d4b1.tar.bz2 android-node-v8-26174fcfe1992f256b78f8053a1f2b02e545d4b1.zip |
crypto: expose ECDH class
For consistency with the rest of the crypto classes, exposes the ECDH
class. Originally, only the createECDH function was exposed, and there
was no real reason to hide the class.
PR-URL: https://github.com/nodejs/node/pull/8188
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Diffstat (limited to 'lib/crypto.js')
-rw-r--r-- | lib/crypto.js | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/lib/crypto.js b/lib/crypto.js index 1c8c6b36fb..eb797b86ee 100644 --- a/lib/crypto.js +++ b/lib/crypto.js @@ -79,10 +79,6 @@ const { } = require('internal/crypto/util'); const Certificate = require('internal/crypto/certificate'); -function createECDH(curve) { - return new ECDH(curve); -} - module.exports = exports = { // Methods _toBuf: toBuf, @@ -92,7 +88,7 @@ module.exports = exports = { createDecipheriv: Decipheriv, createDiffieHellman: DiffieHellman, createDiffieHellmanGroup: DiffieHellmanGroup, - createECDH, + createECDH: ECDH, createHash: Hash, createHmac: Hmac, createSign: Sign, @@ -124,6 +120,7 @@ module.exports = exports = { Decipheriv, DiffieHellman, DiffieHellmanGroup, + ECDH, Hash, Hmac, Sign, |