mirror of
https://github.com/fluencelabs/js-libp2p-crypto
synced 2025-03-15 10:41:03 +00:00
commit
16d8790472
@ -26,7 +26,7 @@ module.exports = (curveName) => {
|
||||
const genSharedKey = (theirPub, forcePrivate) => {
|
||||
const pub = ec.keyFromPublic(theirPub, 'hex')
|
||||
const p = forcePrivate || priv
|
||||
return p.derive(pub.getPublic()).toBuffer('le')
|
||||
return p.derive(pub.getPublic()).toBuffer('be')
|
||||
}
|
||||
|
||||
return {
|
||||
|
Loading…
x
Reference in New Issue
Block a user