Even though SHA-256 is only used in one place to just hash a session key, it pulls 2 irrelevant deps. This PR removes sha.js and replaces it with a more lightweight and maintained library: https://github.com/emn178/js-sha256.
I first wanted to go with using Web Crypto API, but the problem is that it would require a semver major bump because it's supported starting Node 15.
Another option is using @noble/curves which are audited and used by most of Ethereum cryptography, but it would pull the code for the whole package, not just sha256
Summary
Even though SHA-256 is only used in one place to just hash a session key, it pulls 2 irrelevant deps. This PR removes sha.js and replaces it with a more lightweight and maintained library: https://github.com/emn178/js-sha256.
I first wanted to go with using Web Crypto API, but the problem is that it would require a semver major bump because it's supported starting Node 15.
How did you test your changes?
All tests passed.