1#ifndef SHA1_H
2#define SHA1_H
3/* ================ sha1.h ================ */
4/*
5SHA-1 in C
6By Steve Reid <[email protected]>
7100% Public Domain
8*/
9
10typedef struct {
11 uint32_t state[5];
12 uint32_t count[2];
13 unsigned char buffer[64];
14} SHA1_CTX;
15
16void SHA1Transform(uint32_t state[5], const unsigned char buffer[64]);
17void SHA1Init(SHA1_CTX* context);
18void SHA1Update(SHA1_CTX* context, const unsigned char* data, uint32_t len);
19void SHA1Final(unsigned char digest[20], SHA1_CTX* context);
20
21#ifdef REDIS_TEST
22int sha1Test(int argc, char **argv, int flags);
23#endif
24#endif
25