Home | History | Annotate | Download | only in pppd
      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 #ifndef SHA1_SIGNATURE_SIZE
     12 #ifdef SHA_DIGESTSIZE
     13 #define SHA1_SIGNATURE_SIZE SHA_DIGESTSIZE
     14 #else
     15 #define SHA1_SIGNATURE_SIZE 20
     16 #endif
     17 #endif
     18 
     19 typedef struct {
     20     u_int32_t state[5];
     21     u_int32_t count[2];
     22     unsigned char buffer[64];
     23 } SHA1_CTX;
     24 
     25 extern void SHA1_Init(SHA1_CTX *);
     26 extern void SHA1_Update(SHA1_CTX *, const unsigned char *, unsigned int);
     27 extern void SHA1_Final(unsigned char[SHA1_SIGNATURE_SIZE], SHA1_CTX *);
     28 
     29 #define __SHA1_INCLUDE_
     30 #endif /* __SHA1_INCLUDE_ */
     31 
     32