Red Hat Bugzilla – Bug 542547
RFE: please add "hash-type" prefix to *sum utilities
Last modified: 2012-08-29 11:26:34 EDT
Description of problem:
All of /usr/bin/*sum utilities produce very similar output consisting of a long number of hex-digits, so that later one can't instantly understand what type of hash it is.
It was acceptable in the old md5sum-only days, but now it causes much confusion. For example, see bug #515715.
Of course, one can count the number of digits, but a) that's weird; b) different algorythms can use equal hash length.
The problem would be eliminated if *sum utils could prefix hashes with "type-tag", similarly to what is done in /etc/shadow. For example, "sha1:..." or "sha1/...".
(And that is THE RIGHT THING -- data of unknown type is bad, so http introduced "Content-type:" header, PGP includes "Hash:" prefix, etc. With current diversity of hash types, that becomes the barest necessity for *sum utils too...)
Of course, for compatibility reasons, that have to be switched on explicitly -- e.g., with "-l" (Label). And besides adding such tags, *sum have to understand such prefixes, but that's trivial.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
Thanks for filling the bug! I can see the same issue has been raised at upstream mailing-list already. Let's give them some time for reply. We can then update this bug accordingly.
Corresponding thread at upstream mailing-list:
This enhancement request has now been resolved upstream and is mentioned here: http://git.savannah.gnu.org/cgit/coreutils.git/commit/?id=c9f4c323220f51a42e3da8ea79f9ddcedab041b9