Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using randombytes package instead of crypto #26

Merged
merged 1 commit into from
May 10, 2021

Conversation

niklabh
Copy link

@niklabh niklabh commented May 30, 2017

using randombytes package instead of crypto as it helps in elimination of extra crypto libs inclusion if the code being used for the browser.

webpack include crypto code e.g. sha1 elliptic bn in the bundle if the crypto library is being used.
With this commit there is about 600K size reduction in bundle size for webpack.

with crypto:
crypto

with randombytes:
randombytes

…n of crypto lib inclusion if lib is being used for browser
@CezaryDanielNowak
Copy link

Fixes issue #27

@dzek69
Copy link

dzek69 commented Mar 6, 2019

I'd like to see a benchmark for node here. Using JS code instead of built-in compiled c++ module is probably (much?) slower.

Sticking to native solutions is almost always better choice. You can use an alias in webpack in the meantime for browsers.

@eliaskg eliaskg merged commit 0475716 into klughammer:master May 10, 2021
@mindsers mindsers mentioned this pull request Dec 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants