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