libbb/hash_md5_sha: use common ctx and code for md5 and sha1/256
authorDenys Vlasenko <vda.linux@googlemail.com>
Tue, 19 Oct 2010 00:16:12 +0000 (02:16 +0200)
committerDenys Vlasenko <vda.linux@googlemail.com>
Tue, 19 Oct 2010 00:16:12 +0000 (02:16 +0200)
commit302ad1450e104460abd3aae60b7f40d8a88f43df
tree0558bb8533889fa16d820e4466d3b72da083b9f6
parentd982da79deb36185c420f94417b57e7b8a4af04c
libbb/hash_md5_sha: use common ctx and code for md5 and sha1/256

function                                             old     new   delta
sha256_process_block64                               421     433     +12
md5_crypt                                            578     587      +9
md5_begin                                             43      50      +7
md5_hash                                              99      97      -2
sha1_end                                              85      82      -3
md5_end                                               36      31      -5
common64_end                                          93      86      -7
sha1_hash                                             97       -     -97

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
include/libbb.h
libbb/hash_md5_sha.c