Re: Checksumming tool
Lars Wirzenius wrote:
> The best I've come up with so far is a pseudo rfc822 syntax:
> File: foo%20bar/hellurei.txt
> Size: 12345
> MD5: 012345667
> SHA-256: 0a0a0a0a0a0a0a0a0a0a0a0a
> Mode: 0644
anthony@feynman:tmp$ md5sum test
anthony@feynman:tmp$ sha1sum test
That format is extremely easy to work with using basic Unix commands
like grep, cut, sort, diff, etc. The one you've come up with is not.
Please, keep the useful one record (file) per line format. Is there
something wrong with:
LINE = TAG DELIM1 HASH DELIM2 FILENAME
DELIM1 = " " | "-" | ":" | ... (pick one)
DELIM2 = " "
If you let DELIM1 be either "-" or ":" and DELIM2 be " " then you are
backwards compatible with both md5sum and sha1sum by making 32-character
untagged hashes mean MD5 and 40-character ones mean SHA-1.
is so much easier to deal with than rfc822 stuff.