mirror of
https://github.com/fluencelabs/js-libp2p-crypto
synced 2025-06-30 21:41: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([
|
||||
new Buffer([4]), // uncompressed point
|
||||
toBn(jwk.x).toBuffer('be', byteLen),
|
||||
toBn(jwk.y).toBuffer('be', byteLen)
|
||||
toBn(jwk.x).toArrayLike(Buffer, 'be', byteLen),
|
||||
toBn(jwk.y).toArrayLike(Buffer, 'be', byteLen)
|
||||
], 1 + byteLen * 2)
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user