mirror of
https://github.com/amark/gun.git
synced 2025-03-30 15:08:33 +00:00
Trying different jwk props for ECDH key imports
This commit is contained in:
parent
5abdc308ed
commit
0ca9058430
4
sea.js
4
sea.js
@ -500,12 +500,12 @@
|
||||
const ecdhSubtle = ossl || subtle
|
||||
const keysToEcdhJwk = (pub, d) => { // d === priv
|
||||
const [ x, y ] = Buffer.from(pub, 'base64').toString('utf8').split(':')
|
||||
const key_ops = [ `${d ? 'de' : 'en'}crypt`, 'deriveKey' ]
|
||||
const key_ops = [ `${d ? 'de' : 'en'}crypt` /*, 'deriveKey' */ ]
|
||||
const jwk = d ? { d, key_ops } : { key_ops }
|
||||
return Object.assign(jwk, {
|
||||
kty: 'EC',
|
||||
crv: 'P-256',
|
||||
ext: false,
|
||||
ext: true,
|
||||
x,
|
||||
y
|
||||
})
|
||||
|
Loading…
x
Reference in New Issue
Block a user