diff --git a/ctaocrypt/src/sha256.c b/ctaocrypt/src/sha256.c index d859774e7..d42d137fc 100644 --- a/ctaocrypt/src/sha256.c +++ b/ctaocrypt/src/sha256.c @@ -221,11 +221,11 @@ void Sha256Final(Sha256* sha256, byte* hash) #ifdef FREESCALE_MMCAU /* Kinetis requires only these bytes reversed */ - ByteReverseBytes(&local[SHA256_PAD_SIZE], &local[SHA256_PAD_SIZE], - 2 * sizeof(word32)); + ByteReverseWords(&sha256->buffer[SHA256_PAD_SIZE/sizeof(word32)], + &sha256->buffer[SHA256_PAD_SIZE/sizeof(word32)], + 2 * sizeof(word32)); #endif - XTRANSFORM(sha256, local); XTRANSFORM(sha256, local); #ifdef LITTLE_ENDIAN_ORDER ByteReverseWords(sha256->digest, sha256->digest, SHA256_DIGEST_SIZE); diff --git a/mplabx/test_main.c b/mplabx/test_main.c index 037315e14..ee1fa95a5 100644 --- a/mplabx/test_main.c +++ b/mplabx/test_main.c @@ -24,11 +24,6 @@ #endif #include - #include - #include - #include "PIC32MZ-serial.h" - #define SYSTEMConfigPerformance /* void out SYSTEMConfigPerformance(); */ -#else #if defined(CYASSL_MICROCHIP_PIC32MZ) #define MICROCHIP_PIC32