Add md5sum to the page header
Closed this issue · 7 comments
The md5 sum or any other suitable hash function should be printed in the pages along the page number to help to re-order and re-assign printed pages to each original file in case of an unexpected shuffle and/or mix of pages from different files.
Good point, will add it soon.
(Btw @gtheler were you able to run the script on your machine? If you have any problems please let me know in separate issues).
Yes, it runs but:
- when the script is called without arguments it complains about only being able to use base64. I think no arguments should be equal to
-h
. - when I try to pass an abolute path as the input files, it complains about only being able to process files.
- when I follow the example from the README I do not get any PDF output. I imagine I am missing some dependency (is
img2pdf
a command?). It should check everything is there withwhich
before running.
Ok, many thanks for the feedback. Opening separate issues and tagging you for the other points you mention.
@gtheler I added not MD5 (which I think starts to be regarded as a bit old) but sha512. I has been added:
- on the 1st page in full
- on each of the data page, 20 first chars
- in the qr-code on the first page about metadata
You can see it for example there:
https://github.com/jerabaul29/qrdump/blob/master/doc/illustration_pdf_dump/illustration_2.png
If you are satisfied let me know and I will close.
well, it's your project but the idea of adding this information is to help a human to identify a printed sheet of paper and to be able to know to which actual file the sheet belongs. A 512 ubit hash is too long for that, a 128-bit hash is better becaise
it fits in a single line without needing to chop it. As deprecated as it is, it still allows the user to differentiate two versions of the same file.
I do not think that taking the first 128 bits of sha512 is weaker than using the 128 bits of md5sum anyways, so if the user want to check, should be ok. Also this is not to resist attacks, for example dumped gpg keys are armoured. So I think I am happy with the current solution as you say :) .
Closing then, as this is added and functional, if you find any problem feel free to re open.