DevToys-app / DevToys

A Swiss Army knife for developers.
https://devtoys.app/
MIT License
26.94k stars 1.45k forks source link

Checksum Generator is wrong about gz file hash #403

Closed ahmed-abdelrazek closed 2 years ago

ahmed-abdelrazek commented 2 years ago

Description

i tried to checksum a gz file with devtoys and powershell and devtoys gives me a wrong/different value for the same file than powershell which equals the publisher one

Steps To Reproduce

  1. choose sha256 as your hashing algorithm
  2. browse and select a gz file or just drag and drop it in Checksum Generator file area
  3. compare the result with the powershell one

Expected behavior

image image

DevToys Version

Version 1.0.3.0 | X64 | RELEASE | 7c7c02a | 7c7c02a

Relevant Assets/Logs

the logs are empty

michael-hoedl commented 2 years ago

I looked a little bit into this.

With smaller GZ archives, it seems to work correctly. With bigger files (didnt measure the exact breaking point, but i tested it with a 300 MB archive), the output is different than the calculated hash with Get-FileHash.

Here, I tested the tool with an archive, which contains only a single txt file: grafik

Here, I tested the tool with an archive, which contains a single file, which is about 300 MB large. grafik