From 3476fcea6f388d9defbb3579158557656f50e8e1 Mon Sep 17 00:00:00 2001 From: Simon Howard Date: Thu, 15 Mar 2007 18:43:22 +0000 Subject: Change MD5 code to use the standard types used elsewhere in the program. Subversion-branch: /trunk/chocolate-doom Subversion-revision: 858 --- src/md5.h | 23 ++++++++--------------- 1 file changed, 8 insertions(+), 15 deletions(-) (limited to 'src/md5.h') diff --git a/src/md5.h b/src/md5.h index aa15b734..5df7f686 100644 --- a/src/md5.h +++ b/src/md5.h @@ -23,30 +23,23 @@ #ifndef MD5_H #define MD5_H -#ifdef _MSC_VER -#define WIN32_LEAN_AND_MEAN -#include -#define UWORD32 DWORD -#else -#include -#define UWORD32 uint32_t -#endif -#define md5byte unsigned char +#include "doomtype.h" typedef struct md5_context_s md5_context_t; -typedef md5byte md5_digest_t[16]; +typedef byte md5_digest_t[16]; struct md5_context_s { - UWORD32 buf[4]; - UWORD32 bytes[2]; - UWORD32 in[16]; + uint32_t buf[4]; + uint32_t bytes[2]; + uint32_t in[16]; }; void MD5_Init(md5_context_t *context); -void MD5_Update(md5_context_t *context, md5byte const *buf, unsigned len); +void MD5_Update(md5_context_t *context, byte const *buf, unsigned len); void MD5_UpdateInt32(md5_context_t *context, unsigned int val); void MD5_UpdateString(md5_context_t *context, char *str); void MD5_Final(unsigned char digest[16], md5_context_t *context); -void MD5_Transform(UWORD32 buf[4], UWORD32 const in[16]); +void MD5_Transform(uint32_t buf[4], uint32_t const in[16]); #endif /* !MD5_H */ + -- cgit v1.2.3