mirror of
https://github.com/amark/gun.git
synced 2025-06-03 20:56:43 +00:00
fix: Object.assign modiifies S.ecdh which should be static
This commit is contained in:
parent
203a80a430
commit
597bb77a98
@ -13,7 +13,7 @@
|
||||
var epriv = pair.epriv;
|
||||
var ecdhSubtle = shim.ossl || shim.subtle;
|
||||
var pubKeyData = keysToEcdhJwk(pub);
|
||||
var props = Object.assign(S.ecdh, { public: await ecdhSubtle.importKey(...pubKeyData, true, []) });
|
||||
var props = Object.assign({ public: await ecdhSubtle.importKey(...pubKeyData, true, []) },S.ecdh);
|
||||
var privKeyData = keysToEcdhJwk(epub, epriv);
|
||||
var derived = await ecdhSubtle.importKey(...privKeyData, false, ['deriveKey']).then(async (privKey) => {
|
||||
// privateKey scope doesn't leak out from here!
|
||||
@ -47,4 +47,4 @@
|
||||
}
|
||||
|
||||
module.exports = SEA.secret;
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user