From 25221b7d2afb70f82eb3805330fd39a6f6708049 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Tue, 26 Jun 2012 23:41:55 +0000 Subject: mk: removed all LIST_INTERFACE, MI_INTERFACE & UTF8_INTERFACE instances. all related functions moved to mir_core. git-svn-id: http://svn.miranda-ng.org/main/trunk@644 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- include/m_utils.h | 79 ------------------------------------------------------- 1 file changed, 79 deletions(-) (limited to 'include/m_utils.h') diff --git a/include/m_utils.h b/include/m_utils.h index ad8b99e46d..57cde573e4 100644 --- a/include/m_utils.h +++ b/include/m_utils.h @@ -432,85 +432,6 @@ __inline static TCHAR* Utils_ReplaceVarsT(const TCHAR *szData) { #define MS_UTILS_GETBITMAPFILTERSTRINGST MS_UTILS_GETBITMAPFILTERSTRINGS #endif -/* - MD5 interface. 0.7.0.12 - - Contains functions for md5 handling -*/ -/* 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; - -struct MD5_INTERFACE -{ - int cbSize; - void (*md5_init) (mir_md5_state_t *pms); - void (*md5_append) (mir_md5_state_t *pms, const mir_md5_byte_t *data, int nbytes); - void (*md5_finish) (mir_md5_state_t *pms, mir_md5_byte_t digest[16]); - void (*md5_hash) (const mir_md5_byte_t *data, int len, mir_md5_byte_t digest[16]); -}; - -#define MS_SYSTEM_GET_MD5I "Miranda/System/GetMD5I" - -static __inline INT_PTR mir_getMD5I(struct MD5_INTERFACE* dest) -{ - dest->cbSize = sizeof(*dest); - return CallService(MS_SYSTEM_GET_MD5I, 0, (LPARAM)dest); -} - -extern struct MD5_INTERFACE md5i; - -#define mir_md5_init(A) md5i.md5_init(A) -#define mir_md5_append(A,B,C) md5i.md5_append(A,B,C) -#define mir_md5_finish(A,B) md5i.md5_finish(A,B) -#define mir_md5_hash(A,B,C) md5i.md5_hash(A,B,C) - -/* - SHA1 interface. 0.7.0.12 - - Contains functions for SHA1 handling -*/ -typedef unsigned char mir_sha1_byte_t; -typedef unsigned long mir_sha1_long_t; -#define MIR_SHA1_HASH_SIZE 20 - -typedef struct { - mir_sha1_long_t H[5]; - mir_sha1_long_t W[80]; - int lenW; - mir_sha1_long_t sizeHi, sizeLo; -} mir_sha1_ctx; - -struct SHA1_INTERFACE -{ - int cbSize; - void (*sha1_init) (mir_sha1_ctx *ctx); - void (*sha1_append) (mir_sha1_ctx *ctx, mir_sha1_byte_t *dataIn, int len); - void (*sha1_finish) (mir_sha1_ctx *ctx, mir_sha1_byte_t hashout[20]); - void (*sha1_hash) (mir_sha1_byte_t *dataIn, int len, mir_sha1_byte_t hashout[20]); -}; - -#define MS_SYSTEM_GET_SHA1I "Miranda/System/GetSHA1I" - -static __inline INT_PTR mir_getSHA1I(struct SHA1_INTERFACE* dest) -{ - dest->cbSize = sizeof(*dest); - return CallService(MS_SYSTEM_GET_SHA1I, 0, (LPARAM)dest); -} - -extern struct SHA1_INTERFACE sha1i; - -#define mir_sha1_init(A) sha1i.sha1_init(A) -#define mir_sha1_append(A,B,C) sha1i.sha1_append(A,B,C) -#define mir_sha1_finish(A,B) sha1i.sha1_finish(A,B) -#define mir_sha1_hash(A,B,C) sha1i.sha1_hash(A,B,C) - // allows to include TCHAR* strings into mir_snprintf and NetLib_Logf calls #if defined(_UNICODE) #define TCHAR_STR_PARAM "%S" -- cgit v1.2.3