itinance / itinance/react-native-fs

Wrong sha1 checksum for large files (around 1GB)

Open
#1,229 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
5k
Forks
1k
PR merge metrics
No merged PRs in 30d

Description

The hash sha1 checksum for large files (1GB ish) on iOS, actual device, always gives back the same (wrong) value, regardless the size of the file.
Smaller files (around 500MB) are fine.
Tests on Simulator/Mac and Android actual device are fine.

```
// eg: download http://212.183.159.230/1GBFILE.zip 1,024 MB

const filePath = `${RNFS.DocumentDirectoryPath}/1GBFILE.zip`;
RNFS.hash(filePath, 'sha1').then(hash => console.log('sha1: ', hash));

// Expected value
sha1: 86c210c323bda0d0b43a7cf2521b0657f0549286
// Output iOS
sha1: da39a3ee5e6b4b0d3255bfef95601890afd80709
```

iOS 15.8.1
"react": "17.0.2",
"react-native": "0.67.5",
"react-native-fs": "2.20.0",

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.