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 | bfc9799 | 2011-04-27 14:16:08 -0700 | [diff] [blame] | 7 | struct SHA1_CTX { |
The Android Open Source Project | f6c3871 | 2009-03-03 19:28:47 -0800 | [diff] [blame] | 8 | unsigned long state[5]; |
| 9 | unsigned long count[2]; |
| 10 | unsigned char buffer[64]; |
Carl Shapiro | bfc9799 | 2011-04-27 14:16:08 -0700 | [diff] [blame] | 11 | }; |
The Android Open Source Project | f6c3871 | 2009-03-03 19:28:47 -0800 | [diff] [blame] | 12 | |
| 13 | #define HASHSIZE 20 |
| 14 | |
| 15 | void SHA1Init(SHA1_CTX* context); |
| 16 | void SHA1Update(SHA1_CTX* context, const unsigned char* data, |
| 17 | unsigned long len); |
| 18 | void SHA1Final(unsigned char digest[HASHSIZE], SHA1_CTX* context); |
| 19 | |
The Android Open Source Project | f6c3871 | 2009-03-03 19:28:47 -0800 | [diff] [blame] | 20 | #endif /*_DALVIK_SHA1*/ |