mirror of
https://github.com/fluencelabs/js-libp2p-crypto
synced 2025-03-15 19:50:58 +00:00
big-endian
This commit is contained in:
parent
54df375df1
commit
51cff12c3f
@ -26,7 +26,7 @@ module.exports = (curveName) => {
|
|||||||
const genSharedKey = (theirPub, forcePrivate) => {
|
const genSharedKey = (theirPub, forcePrivate) => {
|
||||||
const pub = ec.keyFromPublic(theirPub, 'hex')
|
const pub = ec.keyFromPublic(theirPub, 'hex')
|
||||||
const p = forcePrivate || priv
|
const p = forcePrivate || priv
|
||||||
return p.derive(pub.getPublic()).toBuffer('le')
|
return p.derive(pub.getPublic()).toBuffer('be')
|
||||||
}
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user