Multi Commander > Support and Feedback
File Verifier does NOT check sha files
SwissKnife64:
To ignore the format marker for SHA checksum is a HACK, that will work in most cases, but not in all.
SHA1 file can be generated in text or binary mode, and on Linux the default is text!
Command in Linux for text mode: sha1sum -t filename.sha1, the resulting checksum file has " " as format marker in front of the file name
Command in Linux for binary mode: sha1sum -b filename.ext, the resulting checksum file has " *" as format marker in front of the file name
Without an option, text mode is used
So only reading the marker and calling the calculation in the correct mode is the 100% solution.
Mathias (Author):
No it is not a hack. It is an unsupported mode that nobody uses. There is no official spec.
Text mode will not be supported, (Require to much work for something that nobody uses) , it is too weird of a use-case, to much can go wrong. I never seen anyone support it, You have checksum to check if file is valid and not changed. Then you want a checksum of entire file. not only some parts of it.
Mathias (Author):
Use-case for text mode
A text file is created in linux. and that file is open on Windows, in an OLD editor so when file is saved (without any changed) it replaces LF with CRLF, the checksum would still be the same. even if filesize is different and the file content has changed.
Now If you create a file in text mode on linux and compare it on Windows in Binary mode.. they will match. Only the above very narrow use case will fail.
Navigation
[0] Message Index
[*] Previous page
Go to full version