git-compat-util: fix NO_OPENSSL on current macOS
[git.git] / sha256 / block / sha256.h
blob5099d6421d37d2cd4de4eda8f0a1efde8727df98
1 #ifndef SHA256_BLOCK_SHA256_H
2 #define SHA256_BLOCK_SHA256_H
4 #define blk_SHA256_BLKSIZE 64
6 struct blk_SHA256_CTX {
7 uint32_t state[8];
8 uint64_t size;
9 uint32_t offset;
10 uint8_t buf[blk_SHA256_BLKSIZE];
13 typedef struct blk_SHA256_CTX blk_SHA256_CTX;
15 void blk_SHA256_Init(blk_SHA256_CTX *ctx);
16 void blk_SHA256_Update(blk_SHA256_CTX *ctx, const void *data, size_t len);
17 void blk_SHA256_Final(unsigned char *digest, blk_SHA256_CTX *ctx);
19 #define platform_SHA256_CTX blk_SHA256_CTX
20 #define platform_SHA256_Init blk_SHA256_Init
21 #define platform_SHA256_Update blk_SHA256_Update
22 #define platform_SHA256_Final blk_SHA256_Final
24 #endif