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