Page 2 of 3

Posted: 2011-05-04, 05:29 UTC
by MVV
noen,
Does chsum understands filenames in double quotes? E.g.

Code: Select all

MD5("file1.txt") = ...
SHA256("my first movie.avi") = ...
If so it would be much more clever way to detect filename ending than to trace end of line in order to find last brace. Also text editor with string highlighting would be useful way to read such files.


BTW just now I tried cksum command under FreeBSD 8.0 on my old VM and I must say that it uses another output format:

Code: Select all

4294967295 0 1.txt
3576261603 512 PAM
3940192329 512 Stuff
462915865 41647017 boost_1_43_0.tar.gz
3055188612 512 gdm
So I don't think that format provided by you is widely used for years in many systems.

Posted: 2011-05-04, 21:31 UTC
by noen
You still do not catch... (:
Any name means any name!

You do not have to trace last brace.
Think for a while and create algorithm like this:
0/ enumerate known checksum signatures for further usage
1/ check first n character for match known signature (md5, sha256 etc)
2/ when you know what siganture is used you can compute length of the checksum
3/ truncate first n characters where n is equal to signature length +2 (for space and opening brace)
4/ truncate last m characters where m is equal to length of checksum + 4 (for two spaces, brace and equal sign)
...and there you have filename.
Any filename with braces, quotes, equalsigns, quotation marks etc...

The simpler, the better (:
Some say: keep it simple stupid...
...there would be no room for errors. (:

Nothing else you need to do,
unles you want/need to detect end of line style of file (unix, windows, mac).

About cksum in FreeBSD - try to check for other parameters which can change output.
Notice that FreeBSD is not as precise writing manuals as OpenBSD is.
There may be separate tool to compute new checksums and cksum can be used for compatibility only.
In OpenBSD there is also sum, sha1, md5, etc. as separate tools but their functionality was also build in cksum.
Try them (md5, sha1, sha256) in FreeBSD to see what is the format... (:

I wrote that cksum is/was used for years.
Format which i point out is now increasing...

Posted: 2011-05-05, 13:49 UTC
by ghisler(Author)
MD5 (file1) = 01234...
SHA1 (file2) = 01234...
SHA256 (file3) = 01234...
OK, I will try to add these 3 to the next version.

Posted: 2011-05-05, 15:24 UTC
by noen
ghisler(Author) wrote:
MD5 (file1) = 01234...
SHA1 (file2) = 01234...
SHA256 (file3) = 01234...
OK, I will try to add these 3 to the next version.
That is a great news!
Thank you for adding this sugestion to implementation in TC (:

verifier window summary

Posted: 2011-05-09, 23:29 UTC
by noen
One more thing...

Please, make hash verification summary message more legible.
Putting all in the same line is confusig and harder to read.
Most wanted information (Errors and OK) should be at the end (especially when you can change TC fonts).
Please consider putting the sum in separate lines.

current version:

Code: Select all

OK:   File1.txt
OK:   File2.txt
OK:   File3.txt

Errors: 0
OK: 3, not found: 0, read error: 0, wrong checksum: 0
please consider changing for example to this:

Code: Select all

OK:   File1.txt
OK:   File2.txt
OK:   File3.txt
---
     not found: 0
    read error: 0
wrong checksum: 0
---
Errors: 0
    OK: 3

Re: verifier window summary

Posted: 2011-05-10, 11:44 UTC
by ts4242
noen wrote:Putting all in the same line is confusig and harder to read.
I support your request.

For now you can make it more readable by using an external language file and edit the string number 1464 to looks like

Code: Select all

1464="OK: %i                not found: %i                read error: %i                wrong checksum: %i"

Posted: 2011-05-10, 20:22 UTC
by noen
Sorry, but this is only half-measure solution.
It does not change line order and do not imporve much ):
(additional spaces do not break line and do not change line order)
(Author of TC changing checksum verifier could also easly change line order)

Posted: 2011-05-10, 20:35 UTC
by Sir_SiLvA
@Chris:
If you add noen's way of displaying the output please make it OPTIONAL as i like the way it is right now. TIA

Posted: 2011-05-10, 23:41 UTC
by noen
Please let me know... are the power members involved in implementing TC (not only Author of TC)?

If this is true and ts4242's message means that he will be implementing this change... then I have to thank you ts4242. That is a great news.
I am looking forward to new TC version with all the changes implemented (as optional or not).

Posted: 2011-05-11, 11:49 UTC
by ts4242
noen wrote:Please let me know... are the power members involved in implementing TC (not only Author of TC)?
No, power members are not involved in implementing TC because TC is not open source.

noen wrote:If this is true and ts4242's message means that he will be implementing this change...
Usually when a user likes a suggestion from another user, he say "Support" in hope to encourage TC author to implement it if there are many supporters for that suggestion.

Posted: 2011-05-11, 18:45 UTC
by noen
Thanks for explanation (:
Now i have to withdraw my thanks (:
...but it is good to hear you agree (support) with this sugestion.
I hope Author of TC take it into consideration.

Posted: 2012-07-18, 14:11 UTC
by white
ghisler(Author) wrote:SHA256 is already supported, but the format you describe is quite unusual. TC expects files like this:

e5c7e41f033f42cc20c745aa4ebc8bef4f86845e68b75449146b0c5f4a5a37ef *cd49.iso
or
e5c7e41f033f42cc20c745aa4ebc8bef4f86845e68b75449146b0c5f4a5a37ef cd49.iso
or
cd49.iso e5c7e41f033f42cc20c745aa4ebc8bef4f86845e68b75449146b0c5f4a5a37ef
The last format doesn't seem to work. Is that correct?

Posted: 2012-07-19, 14:08 UTC
by ghisler(Author)
You are right, the name must be behind the checksum.

Posted: 2013-09-14, 16:40 UTC
by vudu
Any chance of adding SHA256 calculation (since totalcmd already supports verification) beside CRC32, MD5 and SHA-1 into version 8.50?

No matter in which format, this from *BSD or one Total Commander already supports (hash, asterisk, filename).

Posted: 2013-09-15, 11:55 UTC
by ghisler(Author)
The calculation wouldn't be difficult, but I would need to create a new dialog box because the used standard dialog only supports 3 checkboxes.