Azure IoT common library

Dependents:   STM32F746_iothub_client_sample_mqtt f767zi_mqtt iothub_client_sample_amqp iothub_client_sample_http ... more

Revision:
15:956c6d205aa7
Parent:
0:fa2de1b79154
Child:
19:2e0811512ceb
--- a/sha1.c	Fri Oct 21 22:11:02 2016 +0000
+++ b/sha1.c	Wed Nov 16 21:38:39 2016 -0800
@@ -56,7 +56,6 @@
 /*
 * add "length" to the length
 */
-static uint32_t addTemp;
 #define SHA1AddLength(context, length)                     \
     (addTemp = (context)->Length_Low,                      \
      (context)->Corrupted =                                \
@@ -129,6 +128,7 @@
 int SHA1Input(SHA1Context *context,
     const uint8_t *message_array, unsigned length)
 {
+    uint32_t addTemp;
     if (!length)
         return shaSuccess;
 
@@ -179,6 +179,8 @@
 int SHA1FinalBits(SHA1Context *context, const uint8_t message_bits,
     unsigned int length)
 {
+    uint32_t addTemp;
+
     uint8_t masks[8] = {
         /* 0 0b00000000 */ 0x00, /* 1 0b10000000 */ 0x80,
         /* 2 0b11000000 */ 0xC0, /* 3 0b11100000 */ 0xE0,