Skip to content

Commit

Permalink
doc: clarify DiffieHellmanGroup class docs
Browse files Browse the repository at this point in the history
Make it clearer in the docs that DiffieHellmanGroup does
not support changing the keys after creation.

PR-URL: #38363
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Adrian Estrada <edsadr@gmail.com>
  • Loading branch information
Linkgoron authored and targos committed May 17, 2021
1 parent c0f0c9a commit ae9128e
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions doc/api/crypto.md
Original file line number Diff line number Diff line change
Expand Up @@ -1114,8 +1114,10 @@ module):
added: v0.7.5
-->

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

```mjs
const { createDiffieHellmanGroup } = await import('crypto');
Expand Down

0 comments on commit ae9128e

Please sign in to comment.