add .gitignore
[swift-upb.git] / sha1.h
1 // licensed under the GPL v2 as part of the git project http://git-scm.com/
2 /*
3  * SHA1 routine optimized to do word accesses rather than byte accesses,
4  * and to avoid unnecessary copies into the context array.
5  *
6  * This was initially based on the Mozilla SHA1 implementation, although
7  * none of the original Mozilla code remains.
8  */
9 #ifndef GIT_SHA1
10 #define GIT_SHA1
11
12 typedef struct {
13     unsigned long long size;
14     unsigned int H[5];
15     unsigned int W[16];
16 } blk_SHA_CTX;
17
18 void blk_SHA1_Init(blk_SHA_CTX *ctx);
19 void blk_SHA1_Update(blk_SHA_CTX *ctx, const void *dataIn, unsigned long len);
20 void blk_SHA1_Final(unsigned char hashout[20], blk_SHA_CTX *ctx);
21
22 #endif
23