Paweł Czech
Paweł Czech

Reputation: 45

How to set one md5 hash to multiple files

how can I set one md5 hash to multiple .ps files?

I know how to change md5 hash, but no idea how to set it to value which I would like to have.

Upvotes: 0

Views: 4673

Answers (1)

Khetho Mtembo
Khetho Mtembo

Reputation: 428

To create two files with the same md5 hash you can have a look here https://natmchugh.blogspot.co.za/2014/10/how-i-made-two-php-files-with-same-md5.html?m=1 . The tricky part may be getting them to remain as valid PS files. In the example the author takes advantage of Pups language to add the differing text in such a way the syntax remains correct. Perhaps in a PS text section. Also have a look at https://natmchugh.blogspot.co.za/2015/05/how-to-make-two-binaries-with-same-md5.html?m=1

However usually you do not set the md5 hash but generate it from a file. This allows the recipient of the file to confirm it has not been corrupted by generating the md5 hash on their end and comparing with the one you gave them. If you are looking to generate one md5 hash for multiple files you could

  1. Compress the files and generate the md5 hash from that file
  2. Generate multiple md5 hashes and join them using an algorithm that always ensures the same value is produced from the hashes each time. For example concatenate the hashes or create an md5 hash of all the md5 hashes. The downside is whoever will use the hashes will also need to know the algorithm.

Have a look at Combine MD5 hashes of multiple files

Upvotes: 1

Related Questions