From bca35dec66b9fe685eb0a9a167332714803b0183 Mon Sep 17 00:00:00 2001 From: dhewg Date: Thu, 1 Dec 2011 11:28:21 +0100 Subject: [PATCH] Fix MD4 hashing for x86_64 --- idlib/hashing/MD4.cpp | 8 ++++---- idlib/hashing/MD4.h | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/idlib/hashing/MD4.cpp b/idlib/hashing/MD4.cpp index ab91595..cba08bb 100644 --- a/idlib/hashing/MD4.cpp +++ b/idlib/hashing/MD4.cpp @@ -38,7 +38,7 @@ typedef unsigned char *POINTER; typedef unsigned short int UINT2; /* UINT4 defines a four byte word */ -typedef unsigned long int UINT4; +typedef unsigned int UINT4; /* MD4 context. */ typedef struct { @@ -244,9 +244,9 @@ void MD4_Final( MD4_CTX *context, unsigned char digest[16] ) { MD4_BlockChecksum =============== */ -unsigned long MD4_BlockChecksum( const void *data, int length ) { - unsigned long digest[4]; - unsigned long val; +unsigned int MD4_BlockChecksum( const void *data, int length ) { + unsigned int digest[4]; + unsigned int val; MD4_CTX ctx; MD4_Init( &ctx ); diff --git a/idlib/hashing/MD4.h b/idlib/hashing/MD4.h index 8b5eb90..1eace56 100644 --- a/idlib/hashing/MD4.h +++ b/idlib/hashing/MD4.h @@ -10,6 +10,6 @@ =============================================================================== */ -unsigned long MD4_BlockChecksum( const void *data, int length ); +unsigned int MD4_BlockChecksum( const void *data, int length ); #endif /* !__MD4_H__ */