Menu

#1645 CRC/Hash for Multiple Files should be Separated

open
nobody
None
5
2024-11-11
2024-11-10
aneroid
No

When multiple files are selected for CRC / Hashing, 7-Zip computes the hash of all the files as if they were combined into one or as one concatenated blob. This has very little use - even a tar file has headers and metadata which would generate a different hash than just concatenating the files.

Instead, what 7-Zip should do is: calculate the selected Hash(es) of each file separately and then display the results.

For example, the sha256 hash of some Python installers from bash gives the hash of each file and not the "hash of the combined data of all the files":

$ sha256sum.exe python-3.12.*
c6bdf93f4b2de6dfa1a3a847e7c24ae10edf7f6318653d452cd4381415700ada *python-3.12.0-amd64.exe
2437d83db04fb272af8de65eead1a2fc416b9fac3f6af9ce51a627e32b4fe8f8 *python-3.12.1-amd64.exe
b9314802f9efbf0f20a8e2cb4cacc4d5cfb0110dac2818d94e770e1ba5137c65 *python-3.12.2-amd64.exe
edfc6c84dc47eebd4fae9167e96ff5d9c27f8abaa779ee1deab9c3d964d0de3c *python-3.12.3-amd64.exe

Discussion

  • Igor Pavlov

    Igor Pavlov - 2024-11-11

    It shows arithmetic sum of all hashes.
    command line 7-zip shows all hashes also.

     
  • aneroid

    aneroid - 2024-11-11

    Okay, it's arithmetic sum, didn't know that. But I still don't see the use-case for that; or at least I'm not aware.

    Having multiple files' hashes shown separately seems more common and useful . If arithmetic sum is needed, consider showing the both (1) Arithmetic sum of all hashes (2) Hash of each file separately - since it's being calculated anyway, it doesn't add a compute overhead; just needs to be shown in the results.

    For the GUI, add more more entries for each file. For the CLI, perhaps a new command-line argument for individual hashes to avoid any conflicts with existing code.

     
  • Igor Pavlov

    Igor Pavlov - 2024-11-11

    Yse case: you can calculate hash for whole folders in two sources and compres hash values. Arithmetic sum doesn't depend from file order (NTFS/FAT).
    CLI 7-zip already shows all hashes and sum.

     
    👍
    1

    Last edit: Igor Pavlov 2024-11-11
  • aneroid

    aneroid - 2024-11-11

    So then the Feature Req would be to add that to the GUI as well - showing all hashes along with already showing the sum. That would align the GUI behaviour with the existing CLI behaviour.

    (If you feel that's an unnecessary feature for the GUI, feel free to close/reject this ticket. I don't want to be spammy 😅 )

     

    Last edit: aneroid 2024-11-11
  • Igor Pavlov

    Igor Pavlov - 2024-11-11

    maybe later.
    now you can get all sha256 hashsums via 7-Zip context menu command (Explorer menu):

    7-Zip / SHA-256 -> a.sha256
    
     
    🎉
    1

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.