Skip to content

Commit 71502f2

Browse files
tniessentargos
authored andcommitted
doc: improve ECDH example
PR-URL: #22607 Reviewed-By: Rod Vagg <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
1 parent 516d71a commit 71502f2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

doc/api/crypto.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -706,9 +706,9 @@ If the `inputEncoding` is not provided, `key` is expected to be a [`Buffer`][],
706706
Example (uncompressing a key):
707707

708708
```js
709-
const { ECDH } = require('crypto');
709+
const { createECDH, ECDH } = require('crypto');
710710

711-
const ecdh = ECDH('secp256k1');
711+
const ecdh = createECDH('secp256k1');
712712
ecdh.generateKeys();
713713

714714
const compressedKey = ecdh.getPublicKey('hex', 'compressed');

0 commit comments

Comments
 (0)