ref: 988dc4fc92252070dfdc00c7aa44ebc91c2c7a74
parent: 4d306e9ed969ff29bbceb2092ca67d9671e04a6a
author: giles <giles@ded80894-8fb9-0310-811b-c03f3676ab4d>
date: Sat Jul 20 12:19:33 EDT 2002
minor rearrange git-svn-id: http://svn.ghostscript.com/jbig2dec/trunk@151 ded80894-8fb9-0310-811b-c03f3676ab4d
--- a/sha1.c
+++ b/sha1.c
@@ -101,11 +101,11 @@
/* blk0() and blk() perform the initial expand. */
/* I got the idea of expanding during the round function from SSLeay */
/* FIXME: can we do this in an endian-proof way? */
-#ifndef WORDS_BIGENDIAN
+#ifdef WORDS_BIGENDIAN
+#define blk0(i) block->l[i]
+#else
#define blk0(i) (block->l[i] = (rol(block->l[i],24)&0xFF00FF00) \
|(rol(block->l[i],8)&0x00FF00FF))
-#else
-#define blk0(i) block->l[i]
#endif
#define blk(i) (block->l[i&15] = rol(block->l[(i+13)&15]^block->l[(i+8)&15] \
^block->l[(i+2)&15]^block->l[i&15],1))