]> git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - mdfour.h
common: Define DP_STATIC_ASSERT which wraps static_assert
[xonotic/darkplaces.git] / mdfour.h
index 3ef654c87e157456fe4e41a0899f9a24d5056a7d..5a141755a2cb396f80ff2369fc6086470c00101b 100644 (file)
--- a/mdfour.h
+++ b/mdfour.h
 #ifndef _MDFOUR_H
 #define _MDFOUR_H
 
-#ifndef int32
-#define int32 int
-#endif
+#include <stdint.h>
 
-#if SIZEOF_INT > 4
-#define LARGE_INT32
-#endif
-
-#ifndef uint32
-#define uint32 unsigned int32
-#endif
-
-struct mdfour {
-       uint32 A, B, C, D;
-       uint32 totalN;
+struct mdfour_s {
+       uint32_t A, B, C, D;
+       uint32_t totalN;
 };
 
-void mdfour_begin(struct mdfour *md); // old: MD4Init
-void mdfour_update(struct mdfour *md, const unsigned char *in, int n); //old: MD4Update
-void mdfour_result(struct mdfour *md, unsigned char *out); // old: MD4Final
+void mdfour_begin(struct mdfour_s *md); // old: MD4Init
+void mdfour_update(struct mdfour_s *md, const unsigned char *in, int n); //old: MD4Update
+void mdfour_result(struct mdfour_s *md, unsigned char *out); // old: MD4Final
 void mdfour(unsigned char *out, const unsigned char *in, int n);
 
 #endif // _MDFOUR_H