xref: /haiku/src/libs/libsolv/solv/sha1.h (revision 909af08f4328301fbdef1ffb41f566c3b5bec0c7)
1 /* public api for steve reid's public domain SHA-1 implementation */
2 /* this file is in the public domain */
3 
4 #include <stdint.h>
5 
6 typedef struct {
7     uint32_t state[5];
8     uint32_t count[2];
9     uint8_t  buffer[64];
10 } SHA1_CTX;
11 
12 #define SHA1_DIGEST_SIZE 20
13 
14 void solv_SHA1_Init(SHA1_CTX* context);
15 void solv_SHA1_Update(SHA1_CTX* context, const uint8_t* data, const size_t len);
16 void solv_SHA1_Final(SHA1_CTX* context, uint8_t digest[SHA1_DIGEST_SIZE]);
17