msvc: Fix an "conversion, possible loss of data" warning
[libgit2.git] / src / block-sha1 / sha1.h
blob558d6aece77743bc4be56a0a62ca9838131d217f
1 /*
2 * SHA1 routine optimized to do word accesses rather than byte accesses,
3 * and to avoid unnecessary copies into the context array.
5 * This was initially based on the Mozilla SHA1 implementation, although
6 * none of the original Mozilla code remains.
7 */
9 typedef struct {
10 unsigned long long size;
11 unsigned int H[5];
12 unsigned int W[16];
13 } blk_SHA_CTX;
15 void git__blk_SHA1_Init(blk_SHA_CTX *ctx);
16 void git__blk_SHA1_Update(blk_SHA_CTX *ctx, const void *dataIn, unsigned long len);
17 void git__blk_SHA1_Final(unsigned char hashout[20], blk_SHA_CTX *ctx);
19 #define SHA_CTX blk_SHA_CTX
20 #define SHA1_Init git__blk_SHA1_Init
21 #define SHA1_Update git__blk_SHA1_Update
22 #define SHA1_Final git__blk_SHA1_Final