On 07/24/2012 02:44 PM, Pádraig Brady wrote:
> On 07/24/2012 12:18 PM, Ondrej Oprala wrote:
>> Hello,
>>   I'd like to consult this RFE 
>> http://lists.gnu.org/archive/html/bug-coreutils/2009-11/msg00341.html and
>>   find out if my proposed solutions would be satisfactory. There shouldn't 
>> be a problem with printing the
>>   hash-type prefix before printing the generated hash. My concerns are more 
>> with the hash utils' logic
>>   during hash check. Should the utils recognize the prefix/prefixless 
>> version of the input on their own
>>   or should they require the proposed '-l' switch during the checking as 
>> well? Personally, I'd lean more
>>   towards the idea of automatic prefix recognition, which shouldn't be too 
>> hard to implement and would probably
>>   feel more natural to everyone.
>>   Cheers,
>>    Ondrej Oprala
> 
> A fairly sensible idea.
> 
> Generating the tags would need to be optional of course.
> I vote for --tag.

Hmm, we already support a tagged format.
The BSD default format from the md5, sha1, sha256 utils is of the form:

MD5 (filename) = ....................

No point in coming up with another format.

> Consuming the tags with --check should be automatic.
> 
> Tags could be useful too if we ever decided to consolidate
> to a single checksum util.

I notice that openbsd applies that technique to its cksum util,
and it outputs in the BSD format above:

http://www.openbsd.org/cgi-bin/man.cgi?query=cksum
http://www.openbsd.org/cgi-bin/cvsweb/src/bin/md5/md5.c?rev=HEAD;content-type=text%2Fplain

cheers,
Pádraig.

Reply via email to