build: skip checking for networks source directories
[mldonkey.git] / src / utils / lib / md4.h
blob6c1c68ab2a9e6e33db852782b5eabed12a1790c4
1 #ifndef MD4_H
2 #define MD4_H
4 /* MD4C.C - RSA Data Security, Inc., MD4 message-digest algorithm
5 */
7 /* Copyright (C) 1990-2, RSA Data Security, Inc. All rights reserved.
9 License to copy and use this software is granted provided that it
10 is identified as the "RSA Data Security, Inc. MD4 Message-Digest
11 Algorithm" in all material mentioning or referencing this software
12 or this function.
14 License is also granted to make and use derivative works provided
15 that such works are identified as "derived from the RSA Data
16 Security, Inc. MD4 Message-Digest Algorithm" in all material
17 mentioning or referencing the derived work.
19 RSA Data Security, Inc. makes no representations concerning either
20 the merchantability of this software or the suitability of this
21 software for any particular purpose. It is provided "as is"
22 without express or implied warranty of any kind.
24 These notices must be retained in any copies of any part of this
25 documentation and/or software.
28 /* PROTOTYPES should be set to one if and only if the compiler supports
29 function argument prototyping.
30 The following makes PROTOTYPES default to 0 if it has not already
31 been defined with C compiler flags.
33 #ifndef PROTOTYPES
34 #define PROTOTYPES 0
35 #endif
37 /* POINTER defines a generic pointer type */
38 typedef unsigned char *POINTER;
40 /* UINT2 defines a two byte word */
41 typedef unsigned short int UINT2;
43 /* UINT4 defines a four byte word */
44 typedef unsigned int UINT4;
46 /* PROTO_LIST is defined depending on how PROTOTYPES is defined above.
47 If using PROTOTYPES, then PROTO_LIST returns the list, otherwise it
48 returns an empty list.
51 #if PROTOTYPES
52 #define PROTO_LIST(list) list
53 #else
54 #define PROTO_LIST(list) ()
55 #endif
57 /* MD4 context. */
58 typedef struct {
59 UINT4 state[4]; /* state (ABCD) */
60 UINT4 count[2]; /* number of bits, modulo 2^64 (lsb first) */
61 unsigned char buffer[64]; /* input buffer */
62 } MD4_CTX;
64 void MD4Init PROTO_LIST ((MD4_CTX *));
65 void MD4Update PROTO_LIST
66 ((MD4_CTX *, unsigned char *, unsigned int));
67 void MD4Final PROTO_LIST ((unsigned char [16], MD4_CTX *));
69 #define md4_init(contextp) Md4Init(contextp)
70 #define md4_append(contextp,buffer,len) MD4Update(contextp,buffer,len)
71 #define md4_finish(contextp,digest) MD4Final(digest, contextp)
73 #endif