chocolatey / checksum

Validates MD5/SHA1 CheckSums on the command line.
Apache License 2.0
14 stars 13 forks source link

Hash files larger than 2GB #6

Closed ferventcoder closed 1 year ago

TheCakeIsNaOH commented 2 years ago

I've been unable to find any issues with checksuming large files. 4gb+ ISO files checksum just fine for me with checksum.exe

AdmiringWorm commented 1 year ago

I have been trying to reproduce the issue that is linking to this issue to see if the problem is actually in the checksum library itself.

Unfortunately, I am seeing the same results as @TheCakeIsNaOH both when testing on Windows Server 2008R2 (for pure .NET 4.0 Support) and on Windows 11.

The following steps was exercised to try reproducing this issue:

  1. Run the following in PowerShell fsutil file createNew "$PWD\test-file-large.bin" "$(4GB)" (will create a new 4GB empty file)
  2. Run .\checksum.exe --file .\test-file-large.bin --hashtype md5 (repeat with the hash type specified for sha1, sha256 and sha512)
  3. Run .\checksum.exe --file .\test-file-large.bin --hashtype md5 --check <REPLACE_WITH_HASH> (Replace the mention of the hash with the checksum gotten in previous steps, and repeat for all hash types).
  4. Create a new 10GB file: fsutil file createNew "$PWD\test-file-very-large.bin" "$(10GB)"
  5. Repeat step 2 and 3 with the new created file.

The previous steps were repeated on both Windows 2008R2 and Windows 11.

Since it seem it is not a problem in the executable here, I'll close this issue and we'll need to look into where the problem is in Chocolatey CLI instead.