Added EAP support with MD5-Challenge and SRP-SHA1 methods. Tested
[ppp.git] / pppd / sha1.h
1 /* sha1.h */
2
3 /* If OpenSSL is in use, then use that version of SHA-1 */
4 #ifdef OPENSSL
5 #include <t_sha.h>
6 #define __SHA1_INCLUDE_
7 #endif
8
9 #ifndef __SHA1_INCLUDE_
10
11 typedef struct {
12     unsigned long state[5];
13     unsigned long count[2];
14     unsigned char buffer[64];
15 } SHA1_CTX;
16
17 extern void SHA1_Init(SHA1_CTX *);
18 extern void SHA1_Update(SHA1_CTX *, const unsigned char *, unsigned int);
19 extern void SHA1_Final(unsigned char[SHA1_SIGNATURE_SIZE], SHA1_CTX *);
20
21 #define __SHA1_INCLUDE_
22 #endif /* __SHA1_INCLUDE_ */
23
24 #ifndef SHA1_SIGNATURE_SIZE
25 #ifdef SHA_DIGESTSIZE
26 #define SHA1_SIGNATURE_SIZE SHA_DIGESTSIZE
27 #else
28 #define SHA1_SIGNATURE_SIZE 20
29 #endif
30 #endif