Replacement for hash_fd

Devin Bayer devin at freeshell.org
Wed Mar 29 12:07:41 PST 2006


Florian Fainelli wrote:
> Hello all,
> 
> I am trying to update an ipkg patch to make it work with busybox 1.1.1, and 
> there is a call to hash_fd. This function has now been removed, is there any 
> replacement for it or has it been completely removed ?

Look in coreutils/md5_sha1_sum.c.  The function hash_file() absorbed the old
hash_fd() code.  I'm not sure how ipkg uses it, but essentialyl just do

1.) call sha1_begin()
2.) break the file up into blocks of any sizes and call sha1_hash() for each one
3.) call sha1_end()

Same for md5.

-- 
Devin Bayer



More information about the busybox mailing list