Bug 542547

Summary: RFE: please add "hash-type" prefix to *sum utilities
Product: [Fedora] Fedora Reporter: Dmitry Bolkhovityanov <d.yu.bolkhovityanov>
Component: coreutilsAssignee: Ondrej Vasik <ovasik>
Status: CLOSED UPSTREAM QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: rawhideCC: kdudka, ooprala, ovasik, twaugh
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-08-29 11:26:34 EDT Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Description Dmitry Bolkhovityanov 2009-11-30 00:20:46 EST
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):

How reproducible:

Steps to Reproduce:
Actual results:

Expected results:

Additional info:
Comment 1 Kamil Dudka 2009-11-30 13:45:07 EST
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.
Comment 2 Kamil Dudka 2009-12-01 06:55:32 EST
Corresponding thread at upstream mailing-list:

Comment 3 Ondrej Oprala 2012-08-29 11:26:34 EDT
This enhancement request has now been resolved upstream and is mentioned here: http://git.savannah.gnu.org/cgit/coreutils.git/commit/?id=c9f4c323220f51a42e3da8ea79f9ddcedab041b9