This library implements some hash and cryptographic algorithms.
Dependents: ES_CW2_Starter_JIN EMBEDDED_CW2 EMBEDDED_CW2_Final Spinnybois ... more
Fork of Crypto by
Revision 15:634f9c4cbab1, committed 2018-03-09
- Comitter:
- estott
- Date:
- Fri Mar 09 10:10:16 2018 +0000
- Parent:
- 14:f04410cef037
- Commit message:
- Reduced flash footprint by removing __forceinline directive in SHA2_32.c
Changed in this revision
Crypto.h | Show diff for this revision Revisions of this file |
hash/SHA2_32.cpp | Show annotated file Show diff for this revision Revisions of this file |
diff -r f04410cef037 -r 634f9c4cbab1 Crypto.h --- a/Crypto.h Sun May 11 13:36:45 2014 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,17 +0,0 @@ -#ifndef CRYPTO_H -#define CRYPTO_H - -#include "AES.h" -#include "RC4.h" -#include "DES.h" -#include "TDES.h" - -#include "MD2.h" -#include "MD4.h" -#include "MD5.h" -#include "SHA1.h" -#include "SHA2.h" - -#include "HMAC.h" - -#endif
diff -r f04410cef037 -r 634f9c4cbab1 hash/SHA2_32.cpp --- a/hash/SHA2_32.cpp Sun May 11 13:36:45 2014 +0000 +++ b/hash/SHA2_32.cpp Fri Mar 09 10:10:16 2018 +0000 @@ -1,6 +1,5 @@ #include "SHA2_32.h" -#include <string.h> - +#include "string.h" static const uint8_t MASK = 0x0F; @@ -35,7 +34,7 @@ 0x510e527f, 0x9b05688c, 0x1f83d9ab, 0x5be0cd19 }; -static uint32_t revWord(const uint32_t w) +inline static uint32_t revWord(const uint32_t w) { #ifdef __CC_ARM return __rev(w); @@ -47,7 +46,7 @@ #endif } -static uint32_t rotRWord(const uint32_t w, const uint32_t n) +inline static uint32_t rotRWord(const uint32_t w, const uint32_t n) { #ifdef __CC_ARM return __ror(w, n); @@ -245,7 +244,7 @@ #ifdef __CC_ARM -__forceinline +//__forceinline #endif void SHA2_32::computeBlock(uint32_t *h02, uint32_t *h12,