+Thu Jun 6 15:43:26 1996 Theodore Y. Ts'o <tytso@mit.edu>
+
+ * shs.c (longReverse): Don't use htonl(); it doesn't exist under
+ Windows. Instead do the test by casting a pointer to an
+ integer to a char *.
+
Mon May 20 17:15:32 1996 Theodore Y. Ts'o <tytso@mit.edu>
* t_shs.c (main): Don't do timing tests; it takes too long!
#include <sys/types.h>
-#include <netinet/in.h>
+#include <string.h>
#include "shs.h"
/* The SHS f()-functions. The f1 and f3 functions can be optimized to
for this information */
#ifdef NEW_SHS
-#define expand(W,i) ( W[ i & 15 ] = ROTL( 1, ( W[ i & 15 ] ^ W[ i - 14 & 15 ] ^ \
- W[ i - 8 & 15 ] ^ W[ i - 3 & 15 ] ) ) )
+#define expand(W,i) ( W[ i & 15 ] = ROTL( 1, ( W[ i & 15 ] ^ W[ (i - 14) & 15 ] ^ \
+ W[ (i - 8) & 15 ] ^ W[ (i - 3) & 15 ] )))
#else
-#define expand(W,i) ( W[ i & 15 ] ^= W[ i - 14 & 15 ] ^ W[ i - 8 & 15 ] ^ W[ i - 3 & 15 ] )
+#define expand(W,i) ( W[ i & 15 ] ^= W[ (i - 14) & 15 ] ^ \
+ W[ (i - 8) & 15 ] ^ W[ (i - 3) & 15 ] )
#endif /* NEW_SHS */
/* The prototype SHS sub-round. The fundamental sub-round is:
{
LONG value;
static int init = 0;
+ char *cp;
switch (init) {
case 0:
- if (htonl(1) != 1) {
+ cp = (char *) &init;
+ if (*cp == 1) {
init=2;
break;
}