Skip to content

Commit ae9128e

Browse files
Linkgorontargos
authored andcommitted
doc: clarify DiffieHellmanGroup class docs
Make it clearer in the docs that DiffieHellmanGroup does not support changing the keys after creation. PR-URL: #38363 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Adrian Estrada <[email protected]>
1 parent c0f0c9a commit ae9128e

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

doc/api/crypto.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1114,8 +1114,10 @@ module):
11141114
added: v0.7.5
11151115
-->
11161116

1117-
The `DiffieHellmanGroup` class takes a well-known modp group as its argument but
1118-
otherwise works the same as `DiffieHellman`.
1117+
The `DiffieHellmanGroup` class takes a well-known modp group as its argument.
1118+
It works the same as `DiffieHellman`, except that it does not allow changing
1119+
its keys after creation. In other words, it does not implement `setPublicKey()`
1120+
or `setPrivateKey()` methods.
11191121

11201122
```mjs
11211123
const { createDiffieHellmanGroup } = await import('crypto');

0 commit comments

Comments
 (0)