Do mail files contain the same files but have different hashes?

I created hundreds of folders and text files using php, then add them to the zip archive.

All this works fine, but if I create another zip archive using the same folders and files, the new archive will have a different hash for the first one. This is the same if I use winrar instead of php to create an archive.

It seems that I only see different hashes when I encrypt the files that I created through php, but they open perfectly.

Is it very strange that someone shed light on this?

thanks

+4
source share
1 answer

There is a certain difference in the files. If the lengths do not match, the hash will be different. For example, you can use the hexadecimal comparison editor, for example, Hex Workshop, to find out exactly what the differences are.

Features that come to my mind:

  • As @orn mentioned, there may be a timestamp in the zip format you are using (not sure).
  • The order of adding files to the archive can be different (depending on how you select them / create the original array).
+5
source

All Articles