Merge branch 'jn/reproducible-build' of ../git-gui into jn/reproducible-build
[git/git.git] / block-sha1 / sha1.h
CommitLineData
d7c208a9 1/*
30ae47b4 2 * SHA1 routine optimized to do word accesses rather than byte accesses,
d7c208a9 3 * and to avoid unnecessary copies into the context array.
30ae47b4
NP
4 *
5 * This was initially based on the Mozilla SHA1 implementation, although
6 * none of the original Mozilla code remains.
d7c208a9
LT
7 */
8
9typedef struct {
d5f6a96f 10 unsigned long long size;
d7c208a9
LT
11 unsigned int H[5];
12 unsigned int W[16];
d7c208a9
LT
13} blk_SHA_CTX;
14
15void blk_SHA1_Init(blk_SHA_CTX *ctx);
16void blk_SHA1_Update(blk_SHA_CTX *ctx, const void *dataIn, unsigned long len);
17void blk_SHA1_Final(unsigned char hashout[20], blk_SHA_CTX *ctx);
18
3bc72fde
APD
19#define platform_SHA_CTX blk_SHA_CTX
20#define platform_SHA1_Init blk_SHA1_Init
21#define platform_SHA1_Update blk_SHA1_Update
22#define platform_SHA1_Final blk_SHA1_Final