mirror of
https://github.com/amark/gun.git
synced 2025-06-07 14:46:44 +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 epriv = pair.epriv;
|
||||||
var ecdhSubtle = shim.ossl || shim.subtle;
|
var ecdhSubtle = shim.ossl || shim.subtle;
|
||||||
var pubKeyData = keysToEcdhJwk(pub);
|
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 privKeyData = keysToEcdhJwk(epub, epriv);
|
||||||
var derived = await ecdhSubtle.importKey(...privKeyData, false, ['deriveKey']).then(async (privKey) => {
|
var derived = await ecdhSubtle.importKey(...privKeyData, false, ['deriveKey']).then(async (privKey) => {
|
||||||
// privateKey scope doesn't leak out from here!
|
// privateKey scope doesn't leak out from here!
|
||||||
|
Loading…
x
Reference in New Issue
Block a user