summaryrefslogtreecommitdiff
path: root/tools/checksum/commonheaders.h
diff options
context:
space:
mode:
authorDmitry Kuzkin <bio@ktaspb.ru>2012-07-11 10:10:55 +0000
committerDmitry Kuzkin <bio@ktaspb.ru>2012-07-11 10:10:55 +0000
commit6e4a285f3b2d6a4f8a29ac0004e31e5b22993001 (patch)
tree9106e58f4164fee0feff548e7e10a131e3431305 /tools/checksum/commonheaders.h
parentdb3992b55d0616896da4f616dfd09fac6642b292 (diff)
version 2.0
+ exclude from calculation debug information and timestamps in debug and export entries + print to stdout only filename+hash + support for wildcards and stdin input + remove mir_core.dll dependency git-svn-id: http://svn.miranda-ng.org/main/trunk@898 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'tools/checksum/commonheaders.h')
-rw-r--r--tools/checksum/commonheaders.h32
1 files changed, 32 insertions, 0 deletions
diff --git a/tools/checksum/commonheaders.h b/tools/checksum/commonheaders.h
new file mode 100644
index 0000000000..dcd24ecf1b
--- /dev/null
+++ b/tools/checksum/commonheaders.h
@@ -0,0 +1,32 @@
+
+#define WINVER 0x0700
+#define _WIN32_WINNT 0x0700
+
+
+#include <io.h>
+#include <stddef.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <windows.h>
+#include <tchar.h>
+
+// #include <m_core.h>
+
+// mir_core hack for MD5
+#define MIR_CORE_DLL(T) T __cdecl
+
+
+/* Define the state of the MD5 Algorithm. */
+typedef unsigned char mir_md5_byte_t; /* 8-bit byte */
+typedef unsigned int mir_md5_word_t; /* 32-bit word */
+
+typedef struct mir_md5_state_s {
+ mir_md5_word_t count[2]; /* message length in bits, lsw first */
+ mir_md5_word_t abcd[4]; /* digest buffer */
+ mir_md5_byte_t buf[64]; /* accumulate block */
+} mir_md5_state_t;
+
+MIR_CORE_DLL(void) mir_md5_init(mir_md5_state_t *pms);
+MIR_CORE_DLL(void) mir_md5_append(mir_md5_state_t *pms, const mir_md5_byte_t *data, int nbytes);
+MIR_CORE_DLL(void) mir_md5_finish(mir_md5_state_t *pms, mir_md5_byte_t digest[16]);
+MIR_CORE_DLL(void) mir_md5_hash(const mir_md5_byte_t *data, int len, mir_md5_byte_t digest[16]);