We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0edba5b commit 99061f0Copy full SHA for 99061f0
web-crypto/derive-key/ecdh.js
@@ -98,8 +98,10 @@
98
);
99
}
100
101
- async function setup() {
102
- // Generate 2 ECDH key pairs: one for Alice and one for Bob.
+ async function agreeSharedSecretKey() {
+ // Generate 2 ECDH key pairs: one for Alice and one for Bob
103
+ // In more normal usage, they would generate their key pairs
104
+ // separately and exchange public keys securely
105
let alicesKeyPair = await window.crypto.subtle.generateKey(
106
{
107
name: "ECDH",
@@ -137,6 +139,6 @@
137
139
});
138
140
141
- setup();
142
+ agreeSharedSecretKey();
143
144
})();
0 commit comments