fit: add sha256 support

add sha256 support to fit images

Signed-off-by: Heiko Schocher <hs@denx.de>
Acked-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
Heiko Schocher 2014-03-03 12:19:25 +01:00 committed by Tom Rini
parent 097dd3e0a9
commit 2842c1c242
5 changed files with 20 additions and 3 deletions

View file

@ -258,14 +258,15 @@ void sha256_csum_wd(const unsigned char *input, unsigned int ilen,
{
sha256_context ctx;
#if defined(CONFIG_HW_WATCHDOG) || defined(CONFIG_WATCHDOG)
unsigned char *end, *curr;
const unsigned char *end;
unsigned char *curr;
int chunk;
#endif
sha256_starts(&ctx);
#if defined(CONFIG_HW_WATCHDOG) || defined(CONFIG_WATCHDOG)
curr = input;
curr = (unsigned char *)input;
end = input + ilen;
while (curr < end) {
chunk = end - curr;