summaryrefslogtreecommitdiff
path: root/src/md5.h
diff options
context:
space:
mode:
authorSimon Howard2007-03-15 18:43:22 +0000
committerSimon Howard2007-03-15 18:43:22 +0000
commit3476fcea6f388d9defbb3579158557656f50e8e1 (patch)
tree2b46494b8682b8b366fbf965737d9f602534987a /src/md5.h
parentc2af7bb926e4f7026347739e4a5a58a3bac51d0f (diff)
downloadchocolate-doom-3476fcea6f388d9defbb3579158557656f50e8e1.tar.gz
chocolate-doom-3476fcea6f388d9defbb3579158557656f50e8e1.tar.bz2
chocolate-doom-3476fcea6f388d9defbb3579158557656f50e8e1.zip
Change MD5 code to use the standard types used elsewhere in the program.
Subversion-branch: /trunk/chocolate-doom Subversion-revision: 858
Diffstat (limited to 'src/md5.h')
-rw-r--r--src/md5.h23
1 files changed, 8 insertions, 15 deletions
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 <windows.h>
-#define UWORD32 DWORD
-#else
-#include <inttypes.h>
-#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 */
+