Skip to content

Wrong sha1 checksum for large files (around 1GB) #1229

Open
@scremona-navico

Description

@scremona-navico

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",

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions