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: #44539
PR-URL: #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 RafaelGSS committed Sep 26, 2022
1 parent 6c35f33 commit 39b65d2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions doc/api/crypto.md
Original file line number Diff line number Diff line change
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 39b65d2

Please sign in to comment.