mirror of
https://github.com/amark/gun.git
synced 2025-03-30 15:08:33 +00:00
Fixed derive use of ossl & subtle
This commit is contained in:
parent
b8872aa22d
commit
e4b396a45d
2
sea.js
2
sea.js
@ -497,7 +497,7 @@
|
||||
// Derive shared secret from other's pub and my epub/epriv
|
||||
async derive(pub, { epub, epriv }) {
|
||||
try {
|
||||
const { importKey, deriveKey, exportKey } = ossl
|
||||
const { importKey, deriveKey, exportKey } = ossl || subtle
|
||||
const keystoecdhjwk = (pub, priv) => {
|
||||
const [ x, y ] = Buffer.from(pub, 'base64').toString('utf8').split(':')
|
||||
const jwk = priv ? { d: priv, key_ops: ['decrypt'] } : { key_ops: ['encrypt'] }
|
||||
|
Loading…
x
Reference in New Issue
Block a user