8 Commits

Author SHA1 Message Date
Alex Potsides
a0f387aeab
fix: replace node buffers with uint8arrays (#180)
* fix: replace node buffers with uint8arrays

All usage of node buffers have been replaced with uint8arrays.

BREAKING CHANGES:

- Where node Buffers were returned, now Uint8Arrays are

* chore: remove commented code
2020-08-07 16:23:02 +02:00
Hugo Dias
c956d1ad2a
fix: add buffer, cleanup, reduce size (#170)
* fix: add buffer, cleanup, reduce size

- add buffer related to https://github.com/ipfs/js-ipfs/issues/2924
- remove unnecessary eslint ignore
- remove tweelnacl and use node-forge
- remove browserify-aes  and use node-forge
- use multibase to encode b58
- require only sha256 from multihashing
- reduce bundle size

after all the deps here https://github.com/ipfs/js-ipfs/issues/2924 are merged libp2p-crypto will be able to be bundle with `node: false` 🎉

* fix: reduce bundle size

* fix: use new secp

* fix: bundle size

* chore: update secp

Co-Authored-By: Jacob Heun <jacobheun@gmail.com>

Co-authored-by: Jacob Heun <jacobheun@gmail.com>
2020-03-23 16:55:35 +01:00
Alan Shaw
00477e3bcb
perf: remove asn1.js and use node-forge (#166)
* perf: remove asn1.js from rsa

* fix: tweaks

* fix: it works, but I do not know 100% why

* chore: remove asn1.js

* fix: ensure jwk params encoded as uint

* fix: util tests

* fix: zero pad base64urlToBuffer

* fix: more zero pad

* test: add round trip test

* test: base64url to Buffer with padding
2020-02-26 17:16:32 +01:00
Jacob Heun
d6d06a8404 chore: remove commitlint
chore: update deps

chore: add bundlesize to ci
2019-10-25 13:51:00 +02:00
David Dias
2f8e234044 refactor: the whole thing (#102) 2017-07-22 10:57:27 -07:00
Jack Kleeman
be64372a5e fix(ecdh): allow base64 to be left-0-padded, needed for JWK format
Fixes #97
2017-04-11 11:14:00 +02:00
David Dias
2f065167fa chore: update aegir 2017-03-21 15:05:22 +00:00
nikuda
933119445f fix(utils): make util.toBase64 browserify compatible
`bn.toArrayLike` is used instead of `bn.toBuffer`, to ensure compatibility with browserify.
2016-12-03 09:32:07 +01:00