modified: n.fq
[GalaxyCodeBases.git] / tools / torrent / mktorrent_crc / sha1.h
blobef3bf523617c24ca8f5a47013f8f3c12db683af5
1 /* Public API for Steve Reid's public domain SHA-1 implementation */
2 /* This file is in the public domain */
4 #ifndef __SHA1_H
5 #define __SHA1_H
7 typedef struct {
8 uint32_t state[5];
9 uint32_t count[2];
10 uint8_t buffer[64];
11 } SHA_CTX;
13 #define SHA_DIGEST_LENGTH 20
15 #ifndef ALLINONE
16 void SHA1_Init(SHA_CTX *context);
17 void SHA1_Update(SHA_CTX *context, const uint8_t *data, unsigned long len);
18 void SHA1_Final(uint8_t *digest, SHA_CTX *context);
19 #endif
21 #endif /* __SHA1_H */