Author Topic: File Verifier does NOT check sha files  (Read 152 times)

SwissKnife64

  • Newbie
  • *
  • Posts: 8
    • View Profile
File Verifier does NOT check sha files
« on: August 20, 2026, 09:04:04 »
Observation: when clicking on SHA checksum file, the "File Verifier" opens. I can add the corresponding file for check. Pressing the start button for the SHA check , 0 (zero) files are checked.
Using the dialog with only a MD5 checksum, the dialog adds the corresponding fiel automatically and check works fine.

Expectation: the SHA check works the same way as the MD5 check.

Version: (x64) v16.2 (build 3205)

Mathias (Author)

  • Administrator
  • VIP Member
  • *****
  • Posts: 5014
    • View Profile
    • Multi Commander
Re: File Verifier does NOT check sha files
« Reply #1 on: August 22, 2026, 09:08:54 »
What kind of checksum file..  .md5 file ?  .sha1 ? how do the file look like ? any error message in logview (Ctrl+L ) ?



SwissKnife64

  • Newbie
  • *
  • Posts: 8
    • View Profile
Re: File Verifier does NOT check sha files
« Reply #2 on: Today at 10:16:43 »
The "File Verifier" works for
  • .MD5 file with binary mark (after check sum a "space" and a "*") and file name
  • .SHA1 file with text mark (after check sum 1 or 2 "space" ) and file name.
The specification allows for all checksum files .MD5, .SHA1, .SHA256 and SHA512 the binary make " *" or the text mark "  ".

The extension .SHA is recognized as checksum file, but no calculations are done

If the file name is missing in the checksum file, I can drop a file in the "File Verifier". I expect that the calculation is then done with this fiel. No calculation is done.

Examples of accepted and not accepted check sum files are attached

Powershell 7 command to  generate a accepted .MD5 checksum
$hashObj = Get-FileHash -Path .\LoreIpsum.txt -Algorithm MD5
"{0} *{1}" -f $hashObj.Hash, (Split-Path $hashObj.Path -Leaf) | Out-File -FilePath ".\LoreIpsum.md5"


Powershell 7 command to  generate a accepted .SHA1 checksum (no * in output, but it is calculated as binary)
$hashObj = Get-FileHash -Path .\LoreIpsum.txt -Algorithm SHA1
"{0}  {1}" -f $hashObj.Hash, (Split-Path $hashObj.Path -Leaf) | Out-File -FilePath ".\LoreIpsum.SHA1"

Mathias (Author)

  • Administrator
  • VIP Member
  • *****
  • Posts: 5014
    • View Profile
    • Multi Commander
Re: File Verifier does NOT check sha files
« Reply #3 on: Today at 10:36:33 »
I'm not sure I understand everything you trying to say?

So if the checksum file has 2 or more space between checksum and filename it does not work ?
if file does not contain filename it does not work..
and .SHA does work ?




SwissKnife64

  • Newbie
  • *
  • Posts: 8
    • View Profile
Re: File Verifier does NOT check sha files
« Reply #4 on: Today at 11:05:54 »
The specification for a checksum file are
[checksum][space][format][filename]

The format is a space for text or a * for binary, resulting in a 2 spaces separator "  " or a space and * separator " *"

Following the specifications, a file that is calculated as text has 2 spaces between checksum and file name, a file that is calculated as binary input has a space and a * between checksum and filename

Your "File Verifier" only accepts the " *" separator for .MD5 files
Your "File Verifier" only accepts the " " or "  " separator for .SHA1, .SHA256 or .SHA512 files

https://share.google/aimode/iNfBL2kQlHTPmklSb

Mathias (Author)

  • Administrator
  • VIP Member
  • *****
  • Posts: 5014
    • View Profile
    • Multi Commander
Re: File Verifier does NOT check sha files
« Reply #5 on: Today at 11:08:17 »
Not sure what you mean with binary.  all checksum files are text files.


SwissKnife64

  • Newbie
  • *
  • Posts: 8
    • View Profile
Re: File Verifier does NOT check sha files
« Reply #6 on: Today at 11:16:54 »
When calculating the check sum, the input file normally is read "byte by byte", what is called "binary" mode of calculation. This is why in the checksum file, the * in front of the file name marks the calculation as binary.
Alternatively, the input is read as text, transforming line breaks to the system settings, what is called "text" mode of calculation. This is why in the checksum file, the second " " in front of the file name marks the calculation as text.

Mathias (Author)

  • Administrator
  • VIP Member
  • *****
  • Posts: 5014
    • View Profile
    • Multi Commander
Re: File Verifier does NOT check sha files
« Reply #7 on: Today at 11:30:45 »
When getting checksum of a file, the data from the file is always read as binary. they are never converted into text.   to much can go wrong with that.

SwissKnife64

  • Newbie
  • *
  • Posts: 8
    • View Profile
Re: File Verifier does NOT check sha files
« Reply #8 on: Today at 11:42:31 »
Please read all my comments carefully. I am not a random support forum poster. I report real problems.

When generating a SHA1 file, reading the input byte by byte, the correct .SHA1 file has a * in front of the file name: E836D9DCBE84E119124034499EBC62DE183C35B6 *LoreIpsum.txt

Your "File Verifier" for .SHA1 tries to open the file "*LoreIpsum.txt" (with the * in the file name) and the verification fails because the file is not found.


Mathias (Author)

  • Administrator
  • VIP Member
  • *****
  • Posts: 5014
    • View Profile
    • Multi Commander
Re: File Verifier does NOT check sha files
« Reply #9 on: Today at 11:44:37 »
I never seen * in sha files.. But I make sure it strips them if they are there
and all all space and * between checksum and filename in the file, so it will work with 1 ,2,3,or 100 spaces..
« Last Edit: Today at 11:46:24 by Mathias (Author) »

SwissKnife64

  • Newbie
  • *
  • Posts: 8
    • View Profile
Re: File Verifier does NOT check sha files
« Reply #10 on: Today at 12:03:01 »
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)

  • Administrator
  • VIP Member
  • *****
  • Posts: 5014
    • View Profile
    • Multi Commander
Re: File Verifier does NOT check sha files
« Reply #11 on: Today at 12:18:38 »
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)

  • Administrator
  • VIP Member
  • *****
  • Posts: 5014
    • View Profile
    • Multi Commander
Re: File Verifier does NOT check sha files
« Reply #12 on: Today at 12:40:09 »
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.