diff --git a/doc/api/crypto.md b/doc/api/crypto.md index bf643c9c6b9..78e1bb4f99a 100644 --- a/doc/api/crypto.md +++ b/doc/api/crypto.md @@ -703,9 +703,9 @@ If the `inputEncoding` is not provided, `key` is expected to be a [`Buffer`][], Example (uncompressing a key): ```js -const { ECDH } = require('crypto'); +const { createECDH, ECDH } = require('crypto'); -const ecdh = ECDH('secp256k1'); +const ecdh = createECDH('secp256k1'); ecdh.generateKeys(); const compressedKey = ecdh.getPublicKey('hex', 'compressed');