Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update hash function for node 17 compatibility (#752)
Summary: When running a RN project currently with node 17 it will fail because a deprecated hash function is used with the [node crypto library](https://nodejs.org/en/blog/release/v17.0.0/#openssl-3-0). The error is `ERR_OSSL_EVP_UNSUPPORTED` and will always appear unless a flag is explicitly set. Only the `metro-cache` package is affected. The stable version node 17 has been around for 3 months and will become active LTS in April of this year. **Summary** Switching from a 128 bit `md4` hash to another 128 bit `md5` hash that's safe is enough to fix the issue. However, note that I'm neither a hash function nor a metro cache expert. **Test plan** Tested with stable node 17, with LTS node 16 and also works fine with lowest supported node 12 version. An already built project can be upgraded without the need to clear the cache. Fixes #722 Couldn't find any related issues in the main RN repository. Pull Request resolved: #752 Reviewed By: motiz88 Differential Revision: D33452659 Pulled By: rh389 fbshipit-source-id: f0e289017a9865b155ba88e5275980aeddcfe2ea
- Loading branch information