
Hi Heiko,
On 8 February 2014 22:34, Heiko Schocher hs@denx.de wrote:
From: Hung-ying Tyan tyanh@chromium.org
Add hash_init(), hash_update() and hash_finish() to the hash_algo struct. Add hash_lookup_algo() to look up the struct given an algorithm name.
Signed-off-by: Hung-ying Tyan tyanh@chromium.org Signed-off-by: Simon Glass sjg@chromium.org Signed-off-by: Heiko Schocher hs@denx.de
Acked-by: Simon Glass sjg@chromium.org
I think this is crying out for another patch - an integration to get rid of lib/rsa/rsa-checksum.c. You should be able to look up the hash algorithm name using the hash.h file and get the pad length, etc. from that. Then you can call this progressive hashing API instead of adding new code in lib/rsa/rsa-checksum.c.
There may be a catch, but I can't see one at present.
Regards, Simon