Verifying files from clipboard using certain hash does not work
Moderators: Hacker, petermad, Stefan2, white
Verifying files from clipboard using certain hash does not work
Verifying from clipboard does not work with these hashes, it always returns error:
BLAKE3, SHA224, SHA384, all SHA3_*
It works with all other hash functions.
(I created checksum files with all hash functions (Create Checksum File(s) -> Checksum method). I copied the hash value from the file, selected the target file, then used the "Verify Checksums (from checksum files)" from the menu.)
BLAKE3, SHA224, SHA384, all SHA3_*
It works with all other hash functions.
(I created checksum files with all hash functions (Create Checksum File(s) -> Checksum method). I copied the hash value from the file, selected the target file, then used the "Verify Checksums (from checksum files)" from the menu.)
- ghisler(Author)
- Site Admin
- Posts: 48642
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Re: Verifying files from clipboard using certain hash does not work
BLAKE3 and SHA3_* cannot be verified from clipboard because there is no way to determine these from the length of the hash: The BLAKE3 checksum has the same length as SHA256, and the SHA3_* checksums also have the exact same lengths as the SHA2 checksums. TC therefore assumes the most common checksums only, which are CRC32, MD5, SHA1 and SHA2.
SHA224 and SHA384 are currently not supported because they are very uncommon, but I can add them easily.
SHA224 and SHA384 are currently not supported because they are very uncommon, but I can add them easily.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
Re: Verifying files from clipboard using certain hash does not work
Just ask google the user?because there is no way to determine these from the length of the hash
#146217 personal license
- ghisler(Author)
- Site Admin
- Posts: 48642
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Re: Verifying files from clipboard using certain hash does not work
That would be extremely annoying when having to check 100s of files.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
Re: Verifying files from clipboard using certain hash does not work
I was guessing that too (that Total Commander checks the length to determine the checksum method).
But it's inconsistent behaviour. Total Commander processes those checksums, and the dialog box says this:
"Errors: 1
OK: 0, not found: 0, read error: 0, wrong checksum: 1"
There is no indication of whether the error is a legit error caused by a change in the target file, or it's an error caused by the fact that Total Commander expects a different hash function than what is in the clipboard (SHA256 instead of BLAKE3).
But it's inconsistent behaviour. Total Commander processes those checksums, and the dialog box says this:
"Errors: 1
OK: 0, not found: 0, read error: 0, wrong checksum: 1"
There is no indication of whether the error is a legit error caused by a change in the target file, or it's an error caused by the fact that Total Commander expects a different hash function than what is in the clipboard (SHA256 instead of BLAKE3).
- ghisler(Author)
- Site Admin
- Posts: 48642
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Re: Verifying files from clipboard using certain hash does not work
The alternative would be to calculate 3 checksums at once (SHA256, SHA3_256 and BLAKE3), which would be 3 times slower. I really don't want to do that, sorry.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
Re: Verifying files from clipboard using certain hash does not work
You mean up to 3 times slower? You don't have to check the other ones if one verification is successful. And it could be made an optional feature (perhaps a setting like "HashFallbackOrder=SHA256,SHA3_256,BLAKE3").ghisler(Author) wrote: ↑2024-07-21, 14:29 UTC The alternative would be to calculate 3 checksums at once (SHA256, SHA3_256 and BLAKE3), which would be 3 times slower. I really don't want to do that, sorry.
Can you replace the help page with something more useful. For example:
A note could be added at the end explaining that BLAKE3 and SHA3 hashes cannot be verified using the clipboard.Verify Checksums (from checksum files)
With this function you can verify if your files are intact, for example after copying them over a network or when when using removable media to transfer files. You can verify if your files are correct using stored checksums or hashes. These can be created using the function [Create Checksum File(s)].
Currently Total Commander can verify checksums or hashes in CRC32, MD5, SHA1, SHA2, SHA3 and BLAKE3 formats. Checksum files used to verify files can be in ANSI, UTF-8 (with BOM), or UTF-16 (with or without BOM) encoding.
There are two ways to use this function.
Verifying using checksum files:
1. Select the checksum file(s) you wish to use for verification, or ensure the cursor is on one.
2. Start the 'Verify Checksums' function.
Verify using a checksum or hash on the Widows clipboard:
1. Copy the checksum or hash code to clipboard. (for example a code listed on the web page where you downloaded a file)
2. Put the cursor on the file you want to check.
3. Start the 'Verify Checksums' function.
The verification window that appears is running in a background process. You can switch back to Total Commander and continue working.
Files that fail verification will be selected in the active file panel and highlighted in the verification window. In the verification window, you can move from one failed file to the next/previous one by pressing Ctrl+Down/Up or by using the arrow buttons in the bottom left corner.
Re: Verifying files from clipboard using certain hash does not work
why? Obviously, IF the user wants to check some amounts, ALL of them (here we are not talking about one check)That would be extremely annoying when having to check 100s of files.
will be in ONE of the forms. So you only need to ask me ONCE - "In what form did I prepare the checksum on my
side (in the clipboard) for the verification procedure".
And not to ask 100 times, of course.
#146217 personal license
Re: Verifying files from clipboard using certain hash does not work
Checking 100s of files one by one, each time copying a different code to clipboard and then putting the cursor on a file and then verifying, seems extremely inefficient.
- ghisler(Author)
- Site Admin
- Posts: 48642
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Re: Verifying files from clipboard using certain hash does not work
That's a nice write-up, thanks! Btw, there are actually 3 methods, the last one is:Can you replace the help page with something more useful. For example:
Verify using a checksum contained in the name of the file itself:
1. Place the cursor on a file whose name contains a checksum. The checksum must be separated from the rest of the name by a punctuation mark or space.
2. Start the "Verify Checksums" function. This doesn't work with BLAKE3 and SHA3 because they use the same checksum size as SHA2, so they cannot be distinguished automatically.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
Re: Verifying files from clipboard using certain hash does not work
Aaah, nice.
What do you think about giving the user control like this. My idea is that the user can control what happens for indistinguishable checksums by specifying one or more hash types. Then, if a user primarily uses BLAKE3, he can set it to BLAKE3 only as follows:
HashFallbackOrder=BLAKE3
Or if you were to allow only one type, the setting could be named, for example:
DefaultChecksum=
- ghisler(Author)
- Site Admin
- Posts: 48642
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Re: Verifying files from clipboard using certain hash does not work
Moderator message
Moved to will not be changed
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
Re: Verifying files from clipboard using certain hash does not work
A small workaround would be to display the hash function (checksum method) in the dialog box that TC assumed/used for calculation (for example SHA256). Also add a description to TC's help file which checksums are supported from clipboard.
- ghisler(Author)
- Site Admin
- Posts: 48642
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Re: Verifying files from clipboard using certain hash does not work
That's a good idea, I will show the hash type in the title.
I also found a solution for the preferred hash type:
I will add a new option to wincmd.ini:
PreferHashType=2
possible values:
0=SHA2
1=SHA3
2=BLAKE3 for 256 bit, SHA2 otherwise
3=BLAKE3 for 256 bit, SHA3 otherwise
4=both SHA2 and 3
5=both SHA2 and BLAKE3
6=both SHA3 and BLAKE3
7=all 3, SHA2, SHA3 and BLAKE3
Of course 7 is the slowest because all 3 hashes would have to be calculated together. But this doesn't matter if the files aren't very big.
Maybe i will even add a combobox to choose the hash type.
I also found a solution for the preferred hash type:
I will add a new option to wincmd.ini:
PreferHashType=2
possible values:
0=SHA2
1=SHA3
2=BLAKE3 for 256 bit, SHA2 otherwise
3=BLAKE3 for 256 bit, SHA3 otherwise
4=both SHA2 and 3
5=both SHA2 and BLAKE3
6=both SHA3 and BLAKE3
7=all 3, SHA2, SHA3 and BLAKE3
Of course 7 is the slowest because all 3 hashes would have to be calculated together. But this doesn't matter if the files aren't very big.
Maybe i will even add a combobox to choose the hash type.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
Re: Verifying files from clipboard using certain hash does not work
I don't get it. Can you explain in more detail. What exactly does it do? What verifying methods are effected and in what way.ghisler(Author) wrote: ↑2024-09-02, 16:43 UTC I also found a solution for the preferred hash type:
I will add a new option to wincmd.ini:
PreferHashType=2
possible values: