From dc14fafb2e8282e26eac849659284d6f2ce3300b Mon Sep 17 00:00:00 2001 From: John Safranek Date: Wed, 12 Mar 2014 14:32:02 -0700 Subject: [PATCH] reversed a change to clear a warning, replaced some tabs --- ctaocrypt/src/sha.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/ctaocrypt/src/sha.c b/ctaocrypt/src/sha.c index 0d8938ecf..198ca53a8 100644 --- a/ctaocrypt/src/sha.c +++ b/ctaocrypt/src/sha.c @@ -56,8 +56,8 @@ * document (See note in README). */ #include "stm32f2xx.h" - #include "stm32f2xx_hash.h" - + #include "stm32f2xx_hash.h" + void InitSha(Sha* sha) { /* STM32F2 struct notes: @@ -363,8 +363,9 @@ void ShaFinal(Sha* sha, byte* hash) #ifdef FREESCALE_MMCAU /* Kinetis requires only these bytes reversed */ - ByteReverseBytes(&local[SHA_PAD_SIZE], &local[SHA_PAD_SIZE], - 2 * sizeof(word32)); + ByteReverseWords(&sha->buffer[SHA_PAD_SIZE/sizeof(word32)], + &sha->buffer[SHA_PAD_SIZE/sizeof(word32)], + 2 * sizeof(word32)); #endif XTRANSFORM(sha, local);