crc32 command
Peter Korsgaard
jacmet at sunsite.dk
Sat May 14 17:50:07 EDT 2011
>>>>> "Sascha" == Sascha Hauer <s.hauer at pengutronix.de> writes:
Hi,
>> The crc32 command is largely legacy from u-boot. Would there be interest
>> in a cksum command (it's afaik just like the normal crc32 except it also
>> uses the length) or md5/sha1/sha256sum? We have all the infrastructure,
>> so it should be easy to add.
Sascha> md5sum would be very useful. Would it add much to the binary space?
I don't think so. I did a quick little proof of concept implementation
(which would work for any algorithm supported by the digest stuff) and
it ended up like:
size lib/md5.o common/digest.o commands/md5.o
text data bss dec hex filename
2841 152 0 2993 bb1 lib/md5.o
339 16 0 355 163 common/digest.o
969 0 0 969 3c9 commands/md5.o
So less than 1K if you already use md5/digest for something else,
otherwise ~4K.
I'll clean up the code a bit more and send a patch.
--
Bye, Peter Korsgaard
More information about the barebox
mailing list