1 /*
2  * See "sha1.cpp" for author info.
3  */
4 #ifndef LIBDEX_SHA1_H_
5 #define LIBDEX_SHA1_H_
6 
7 struct SHA1_CTX {
8     unsigned long state[5];
9     unsigned long count[2];
10     unsigned char buffer[64];
11 };
12 
13 #define HASHSIZE 20
14 
15 void SHA1Init(SHA1_CTX* context);
16 void SHA1Update(SHA1_CTX* context, const unsigned char* data,
17     unsigned long len);
18 void SHA1Final(unsigned char digest[HASHSIZE], SHA1_CTX* context);
19 
20 #endif  // LIBDEX_SHA1_H_
21