Fork of François Berder Crypto, fixed AES CBC and small rework
Dependents: AES_example shaun_larada Smartage
Fork of Crypto by
Diff: hash/MD2.cpp
- Revision:
- 13:ac8e23b98dae
- Parent:
- 10:bc9c23aa3870
diff -r cb30c135cd5f -r ac8e23b98dae hash/MD2.cpp --- a/hash/MD2.cpp Tue Apr 08 19:39:25 2014 +0000 +++ b/hash/MD2.cpp Sun May 11 11:14:51 2014 +0000 @@ -55,7 +55,7 @@ bufferLength = length; memcpy(buffer, data, length); } - else if(length < 16-bufferLength) + else if((int)length < 16-bufferLength) { memcpy(&buffer[bufferLength], data, length); bufferLength += length; @@ -123,11 +123,16 @@ memcpy(hash, x, 16); } -__forceinline void MD2::computeBlock(uint8_t *checksum2, uint8_t *x2, uint8_t *l2, uint8_t *buffer2) +#ifdef __CC_ARM +__forceinline +#endif +void MD2::computeBlock(uint8_t *checksum2, uint8_t *x2, uint8_t *l2, uint8_t *buffer2) { if(checksum2 != buffer2) { - #pragma unroll_completely + #ifdef __CC_ARM + #pragma unroll_completely + #endif for(int j = 0; j < 16; ++j) { uint8_t c = buffer2[j]; @@ -146,7 +151,9 @@ x3[8+j] = x3[4+j] ^ x3[j]; uint8_t t = 0; - #pragma unroll_completely + #ifdef __CC_ARM + #pragma unroll_completely + #endif for(int j = 0; j < 18; ++j) { t = (x2[0] ^= s[t]);