OSDN Git Service

Fix no pic
[uclinux-h8/uClinux-dist.git] / user / pam_radius / md5.h
1 #ifndef MD5_H
2 #define MD5_H
3
4 /*
5  *  Some operating systems MAY resolve the MD5* functions to
6  *  secret functions in one of their libraries.  These OS supplied
7  *  MD5 functions almost always blow up, and cause problems.
8  *  To get around the issue, we re-define the MD5 function names
9  *  so that we're sure that our module uses our tested and working
10  *  MD5 functions.
11  */
12 #define MD5Init       pra_MD5Init
13 #define MD5Update     pra_MD5Update
14 #define MD5Final      pra_MD5Final
15 #define MD5Transform  pra_MD5Transform
16
17 #include <inttypes.h>
18
19 struct MD5Context {
20     uint32_t buf[4];
21     uint32_t bits[2];
22     unsigned char in[64];
23 };
24
25 void MD5Init(struct MD5Context *);
26 void MD5Update(struct MD5Context *, unsigned const char *, unsigned);
27 void MD5Final(unsigned char digest[16], struct MD5Context *);
28 void MD5Transform(uint32_t buf[4], uint32_t const in[16]);
29
30 /*
31  * This is needed to make RSAREF happy on some MS-DOS compilers.
32  */
33
34 typedef struct MD5Context MD5_CTX;
35
36 #endif /* MD5_H */