Mercurial > hgrepos > Python2 > PyMuPDF
comparison mupdf-source/thirdparty/jbig2dec/sha1.h @ 3:2c135c81b16c
MERGE: upstream PyMuPDF 1.26.4 with MuPDF 1.26.7
| author | Franz Glasner <fzglas.hg@dom66.de> |
|---|---|
| date | Mon, 15 Sep 2025 11:44:09 +0200 |
| parents | b50eed0cc0ef |
| children |
comparison
equal
deleted
inserted
replaced
| 0:6015a75abc2d | 3:2c135c81b16c |
|---|---|
| 1 /* public api for steve reid's public domain SHA-1 implementation */ | |
| 2 /* this file is in the public domain */ | |
| 3 | |
| 4 #ifndef __SHA1_H | |
| 5 #define __SHA1_H | |
| 6 | |
| 7 #ifdef __cplusplus | |
| 8 extern "C" | |
| 9 { | |
| 10 #endif | |
| 11 | |
| 12 typedef struct { | |
| 13 uint32_t state[5]; | |
| 14 uint32_t count[2]; | |
| 15 uint8_t buffer[64]; | |
| 16 } SHA1_CTX; | |
| 17 | |
| 18 #define SHA1_DIGEST_SIZE 20 | |
| 19 | |
| 20 void SHA1_Init(SHA1_CTX *context); | |
| 21 void SHA1_Update(SHA1_CTX *context, const uint8_t *data, const size_t len); | |
| 22 void SHA1_Final(SHA1_CTX *context, uint8_t digest[SHA1_DIGEST_SIZE]); | |
| 23 | |
| 24 #ifdef __cplusplus | |
| 25 } | |
| 26 #endif | |
| 27 | |
| 28 #endif /* __SHA1_H */ |
