]> de.git.xonotic.org Git - xonotic/netradiant.git/blob - tools/quake2/qdata_heretic2/common/md4.h
my own uncrustify run
[xonotic/netradiant.git] / tools / quake2 / qdata_heretic2 / common / md4.h
1 /*
2     mdfour.h
3
4     an implementation of MD4 designed for use in the SMB authentication
5     protocol
6
7     Copyright (C) Andrew Tridgell 1997-1998
8
9     This program is free software; you can redistribute it and/or
10     modify it under the terms of the GNU General Public License
11     as published by the Free Software Foundation; either version 2
12     of the License, or (at your option) any later version.
13
14     This program is distributed in the hope that it will be useful,
15     but WITHOUT ANY WARRANTY; without even the implied warranty of
16     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
17
18     See the GNU General Public License for more details.
19
20     You should have received a copy of the GNU General Public License
21     along with this program; if not, write to:
22
23         Free Software Foundation, Inc.
24         59 Temple Place - Suite 330
25         Boston, MA  02111-1307, USA
26  */
27
28 #ifndef _MDFOUR_H
29 #define _MDFOUR_H
30
31 #ifndef int32
32 #define int32 int
33 #endif
34
35 #if SIZEOF_INT > 4
36 #define LARGE_INT32
37 #endif
38
39 #ifndef uint32
40 #define uint32 unsigned int32
41 #endif
42
43 struct mdfour {
44         uint32 A, B, C, D;
45         uint32 totalN;
46 };
47
48 void mdfour_begin( struct mdfour *md ); // old: MD4Init
49 void mdfour_update( struct mdfour *md, unsigned char *in, int n ); //old: MD4Update
50 void mdfour_result( struct mdfour *md, unsigned char *out ); // old: MD4Final
51 void mdfour( unsigned char *out, unsigned char *in, int n );
52
53 unsigned Com_BlockChecksum( void *buffer, int length );
54 void Com_BlockFullChecksum( void *buffer, int len, unsigned char *outbuf );
55
56 #endif  // _MDFOUR_H