Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/cr-marcstevens/sha1collisiondetection.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcr-marcstevens <github@marc-stevens.nl>2017-03-16 16:20:37 +0300
committercr-marcstevens <github@marc-stevens.nl>2017-03-16 16:20:37 +0300
commit190251bac5458d7a1d0be1fded994dca944a4d42 (patch)
treea22547600bc5c4032391ce41db59bf1cbd4b37d6
parent0344d0911d6567422734d28e40eb26e7eba667bc (diff)
Fixed bigendian compile bug
-rw-r--r--lib/sha1.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/sha1.c b/lib/sha1.c
index 29a0e52..8d12b83 100644
--- a/lib/sha1.c
+++ b/lib/sha1.c
@@ -40,9 +40,9 @@
#define sha1_mix(W, t) (rotate_left(W[t - 3] ^ W[t - 8] ^ W[t - 14] ^ W[t - 16], 1))
#if defined(BIGENDIAN)
- #define sha1_load(m, t) (m[t])
+ #define sha1_load(m, t, temp) { temp = m[t]; }
#else
- #define sha1_load(m, t, temp) { temp = m[t]; sha1_bswap32(temp); }
+ #define sha1_load(m, t, temp) { temp = m[t]; sha1_bswap32(temp); }
#endif /*define(BIGENDIAN)*/
#define sha1_store(W, t, x) *(volatile uint32_t *)&W[t] = x