]> git.ipfire.org Git - thirdparty/git.git/blame - block-sha1/sha1.h
block-sha1: guard gcc extensions with __GNUC__
[thirdparty/git.git] / block-sha1 / sha1.h
CommitLineData
d7c208a9
LT
1/*
2 * Based on the Mozilla SHA1 (see mozilla-sha1/sha1.h),
3 * optimized to do word accesses rather than byte accesses,
4 * and to avoid unnecessary copies into the context array.
5 */
6
7typedef struct {
d5f6a96f 8 unsigned long long size;
d7c208a9
LT
9 unsigned int H[5];
10 unsigned int W[16];
d7c208a9
LT
11} blk_SHA_CTX;
12
13void blk_SHA1_Init(blk_SHA_CTX *ctx);
14void blk_SHA1_Update(blk_SHA_CTX *ctx, const void *dataIn, unsigned long len);
15void blk_SHA1_Final(unsigned char hashout[20], blk_SHA_CTX *ctx);
16
17#define git_SHA_CTX blk_SHA_CTX
18#define git_SHA1_Init blk_SHA1_Init
19#define git_SHA1_Update blk_SHA1_Update
20#define git_SHA1_Final blk_SHA1_Final