sha1.h revision 73775bb7859ad9a326de3508a579c553c4dec6ce
1/*
2 * See "sha1.c" for author info.
3 */
4#ifndef _DALVIK_SHA1
5#define _DALVIK_SHA1
6
7#include <stdint.h>
8
9typedef struct {
10    uint32_t state[5];
11    uint32_t count[2];
12    uint8_t buffer[64];
13} SHA1_CTX;
14
15#define HASHSIZE 20
16
17#if defined(__cplusplus)
18extern "C" {
19#endif
20
21void SHA1Init(SHA1_CTX* context);
22void SHA1Update(SHA1_CTX* context, const uint8_t* data, uint32_t len);
23void SHA1Final(uint8_t digest[HASHSIZE], SHA1_CTX* context);
24
25#if defined(__cplusplus)
26}
27#endif
28
29#endif /*_DALVIK_SHA1*/
30