The Android Open Source Project | f6c3871 | 2009-03-03 19:28:47 -0800 | [diff] [blame] | 1 | /* |
| 2 | * See "sha1.c" for author info. |
| 3 | */ |
| 4 | #ifndef _DALVIK_SHA1 |
| 5 | #define _DALVIK_SHA1 |
| 6 | |
Carl Shapiro | db0c954 | 2011-04-12 19:14:06 -0700 | [diff] [blame] | 7 | #ifdef __cplusplus |
| 8 | extern "C" { |
| 9 | #endif |
| 10 | |
The Android Open Source Project | f6c3871 | 2009-03-03 19:28:47 -0800 | [diff] [blame] | 11 | typedef struct { |
| 12 | unsigned long state[5]; |
| 13 | unsigned long count[2]; |
| 14 | unsigned char buffer[64]; |
| 15 | } SHA1_CTX; |
| 16 | |
| 17 | #define HASHSIZE 20 |
| 18 | |
| 19 | void SHA1Init(SHA1_CTX* context); |
| 20 | void SHA1Update(SHA1_CTX* context, const unsigned char* data, |
| 21 | unsigned long len); |
| 22 | void SHA1Final(unsigned char digest[HASHSIZE], SHA1_CTX* context); |
| 23 | |
Carl Shapiro | db0c954 | 2011-04-12 19:14:06 -0700 | [diff] [blame] | 24 | #ifdef __cplusplus |
| 25 | } |
| 26 | #endif |
| 27 | |
The Android Open Source Project | f6c3871 | 2009-03-03 19:28:47 -0800 | [diff] [blame] | 28 | #endif /*_DALVIK_SHA1*/ |