mirror of
https://github.com/fluencelabs/js-libp2p-crypto
synced 2025-05-28 03:11:35 +00:00
Merge pull request #53 from libp2p/fix/another-buffer-bites-the-dust
fix: use toArrayLike instead of toBuffer for browserify
This commit is contained in:
commit
fba4833aef
@ -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)
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user