Skip to content

Commit

Permalink
doc: do not use weak MODP group in example
Browse files Browse the repository at this point in the history
As a first, small step toward deprecating modp1, stop using it in an
example that users might copy.

Refs: nodejs/node#44539
PR-URL: nodejs/node#44585
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: theanarkh <theratliter@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
  • Loading branch information
tniessen authored and guangwong committed Jan 3, 2023
1 parent c5d28fd commit 9a94062
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions doc/api/crypto.md
Expand Up @@ -1175,12 +1175,12 @@ or `setPrivateKey()` methods.

```mjs
const { createDiffieHellmanGroup } = await import('node:crypto');
const dh = createDiffieHellmanGroup('modp1');
const dh = createDiffieHellmanGroup('modp16');
```

```cjs
const { createDiffieHellmanGroup } = require('node:crypto');
const dh = createDiffieHellmanGroup('modp1');
const dh = createDiffieHellmanGroup('modp16');
```

The following groups are supported:
Expand Down

0 comments on commit 9a94062

Please sign in to comment.