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