You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
RNFS.hash does not produce the correct SHA256 hash for some (perhaps large) files.
The hash calculated by RNFS.hash differs from the expected value computed using standard tools like shasum and matches the hash reported on the file's source page.
note: My testing has been on GGUF files from Hugging Face, which are typically a few GBs in size. I have not faced this issue with smaller files, from my observation it seems they occurs with files around 1 GB or larger.
Description
RNFS.hash
does not produce the correct SHA256 hash for some (perhaps large) files.The hash calculated by RNFS.hash differs from the expected value computed using standard tools like
shasum
and matches the hash reported on the file's source page.note: My testing has been on GGUF files from Hugging Face, which are typically a few GBs in size. I have not faced this issue with smaller files, from my observation it seems they occurs with files around 1 GB or larger.
Steps to Reproduce:
await RNFS.hash(filePath, 'sha256');
to get the hashshasum -a 256 /PATH/TO/SIMULATOR/DIR/Model-7.6B-Q4_K_S.gguf
Expected Behavior:
The hash returned by RNFS.hash should match the expected SHA256 value:
6d28c300dab7c224f9b34afcca0e0413c985846482f62e49b2cef109f82af926
Actual Behavior:
RNFS.hash returns:
1ba0bd6473b9f7b5a2a355256854ee4345e7abf229361363d745387b4c151958
Additional Information:
RNFS version: 2.30.1
React Native version: 0.76.3
Platform: iOS (Simulator)
The text was updated successfully, but these errors were encountered: