Use more lightweight sha256 implementation
See original GitHub issueUsing sh256 via create-hash pulls in a bunch of dependencies we don’t need, like cipher-base, md5.js and ripemd160.
cipher-base
is particularly problematic for everyone switching from Webpack 4 to Webpack 5 or using other reasonably modern bundlers because it requires node’s stream
: https://github.com/crypto-browserify/cipher-base/blob/v1.0.4/index.js#L7. This causes hard to debug and support problems downstream, like https://github.com/cosmos/cosmjs/issues/925.
I think it would be much nicer to use a dependency that only implements sha256. This could be sha.js or something else, but sha.js is used already anyways.
Issue Analytics
- State:
- Created 2 years ago
- Reactions:8
- Comments:5
Top Results From Across the Web
hash - Are there any SHA-256 javascript implementations that ...
I'm having trouble figuring out which SHA-256 implementation I can actually trust. I was expecting there to be some kind of authoritative script...
Read more >crypto-algorithms/sha256.c at master - GitHub
Details: Implementation of the SHA-256 hashing algorithm. SHA-256 is one of the three algorithms in ... This implementation uses little endian byte order....
Read more >Lightweight and High Performance SHA-256 ... - IEEE Xplore
To the best of our knowledge, our work is the first to employ architectural folding and 4-2 adder compressor in. SHA-256 implementation. A...
Read more >Lightweight, portable, public domain, endian-proof ... - Reddit
Does anyone know of a good sha256 implementation to use when one only needs that one function? Since I literally only need a...
Read more >Fast Embedded Software Hashing - Cryptology ePrint Archive
Cryptographic hash functions are one of the most widely used ... Control flow of the core of our SHA-256 implementation is illustrated in...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
If I get a 👍 for such a change, I’m happy to create a PR.
Here are noble crypro benchmarks from my machine. The 3rd block with 2048 iterations is what matters to this use case. So as long as we are happy with those timings, we can build this lib on @noble/hashes for both sha256 and pbkdf2.