]> granicus.if.org Git - linux-pam/blob - modules/pam_unix/md5.h
Relevant BUGIDs: task 15788, bugs 108297, 117476, 117474
[linux-pam] / modules / pam_unix / md5.h
1
2 #ifndef MD5_H
3 #define MD5_H
4
5 #ifdef __alpha
6 typedef unsigned int uint32;
7 #else
8 typedef unsigned long uint32;
9 #endif
10
11 struct MD5Context {
12         uint32 buf[4];
13         uint32 bits[2];
14         unsigned char in[64];
15 };
16
17 void GoodMD5Init(struct MD5Context *);
18 void GoodMD5Update(struct MD5Context *, unsigned const char *, unsigned);
19 void GoodMD5Final(unsigned char digest[16], struct MD5Context *);
20 void GoodMD5Transform(uint32 buf[4], uint32 const in[16]);
21 void BrokenMD5Init(struct MD5Context *);
22 void BrokenMD5Update(struct MD5Context *, unsigned const char *, unsigned);
23 void BrokenMD5Final(unsigned char digest[16], struct MD5Context *);
24 void BrokenMD5Transform(uint32 buf[4], uint32 const in[16]);
25
26 char *Goodcrypt_md5(const char *pw, const char *salt);
27 char *Brokencrypt_md5(const char *pw, const char *salt);
28
29 /*
30  * This is needed to make RSAREF happy on some MS-DOS compilers.
31  */
32
33 typedef struct MD5Context MD5_CTX;
34
35 #endif                          /* MD5_H */