mirror of
https://github.com/fluencelabs/js-libp2p-crypto
synced 2025-06-30 21:11:46 +00:00
fix: use toArrayLike instead of toBuffer for browserify
This commit is contained in:
@ -98,8 +98,8 @@ function marshalPublicKey (jwk) {
|
|||||||
|
|
||||||
return Buffer.concat([
|
return Buffer.concat([
|
||||||
new Buffer([4]), // uncompressed point
|
new Buffer([4]), // uncompressed point
|
||||||
toBn(jwk.x).toBuffer('be', byteLen),
|
toBn(jwk.x).toArrayLike(Buffer, 'be', byteLen),
|
||||||
toBn(jwk.y).toBuffer('be', byteLen)
|
toBn(jwk.y).toArrayLike(Buffer, 'be', byteLen)
|
||||||
], 1 + byteLen * 2)
|
], 1 + byteLen * 2)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user