From 6e4a285f3b2d6a4f8a29ac0004e31e5b22993001 Mon Sep 17 00:00:00 2001 From: Dmitry Kuzkin Date: Wed, 11 Jul 2012 10:10:55 +0000 Subject: 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 --- tools/checksum/commonheaders.h | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 tools/checksum/commonheaders.h (limited to 'tools/checksum/commonheaders.h') 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 +#include +#include +#include +#include +#include + +// #include + +// 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]); -- cgit v1.2.3