doc: do not use weak MODP group in example

As a first, small step toward deprecating modp1, stop using it in an
example that users might copy.

Refs: https://github.com/nodejs/node/issues/44539
PR-URL: https://github.com/nodejs/node/pull/44585
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: theanarkh <theratliter@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
This commit is contained in:
Tobias Nießen authored and RafaelGSS committed 2022-09-26 19:07:41 -03:00
1 parent 6c35f338c3
commit 39b65d2fb7
1 file changed
+2 -2
+2 -2
View File
@@ -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: