The nodejs crypto package is only being used to create hashes, but then this package doesn't work on browsers unless some complicated shim stuff is done.
The create-hash package has the same API as crypto.createHash and uses the same nodejs crypto when available, but uses its own pure-JS thing when in browsers or browser-like environments like react-native.
Plus: it was also already being included by some deep dependency.
The nodejs
crypto
package is only being used to create hashes, but then this package doesn't work on browsers unless some complicated shim stuff is done.The
create-hash
package has the same API ascrypto.createHash
and uses the same nodejscrypto
when available, but uses its own pure-JS thing when in browsers or browser-like environments like react-native.Plus: it was also already being included by some deep dependency.