root/pehunter/md5.h

Revision 1134, 1.2 kB (checked in by till, 1 year ago)

pehunter initial insert

Line 
1 /*
2  * md5.h
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; either version 2 of the License, or
7  * (at your option) any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program; if not, write to the Free Software
16  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
17  *
18  * Copyright (C) 2007 Tillmann Werner <tillmann.werner@gmx.de>
19  */
20
21 #ifndef __MD5_H
22 #define __MD5_H
23
24 /* Any 32-bit or wider unsigned integer data type will do */
25 typedef unsigned long MD5_u32plus;
26
27 typedef struct {
28         MD5_u32plus lo, hi;
29         MD5_u32plus a, b, c, d;
30         unsigned char buffer[64];
31         MD5_u32plus block[16];
32 } MD5_CTX;
33
34 extern void MD5_Init(MD5_CTX *ctx);
35 extern void MD5_Update(MD5_CTX *ctx, void *data, unsigned long size);
36 extern void MD5_Final(unsigned char *result, MD5_CTX *ctx);
37 char *mem_md5sum(u_char *mempos, u_int32_t size);
38
39 #endif
Note: See TracBrowser for help on using the browser.