[U-Boot] [PATCH v2 6/8] gen: Add progressive hash API

Simon Glass sjg at chromium.org
Sun Feb 16 00:14:17 CET 2014


Hi Heiko,

On 8 February 2014 22:34, Heiko Schocher <hs at denx.de> wrote:
> From: Hung-ying Tyan <tyanh at 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 at chromium.org>
> Signed-off-by: Simon Glass <sjg at chromium.org>
> Signed-off-by: Heiko Schocher <hs at denx.de>

Acked-by: Simon Glass <sjg at 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


More information about the U-Boot mailing list