blob: 28907dedc9f11ddee7cab3b3a9f2508f0d2ca946 [file] [log] [blame]
The Android Open Source Projectf6c38712009-03-03 19:28:47 -08001/*
Brian Carlstrombbf31b52011-05-05 00:01:58 -07002 * See "sha1.cpp" for author info.
The Android Open Source Projectf6c38712009-03-03 19:28:47 -08003 */
Carl Shapiro375fb112011-06-14 20:31:24 -07004#ifndef LIBDEX_SHA1_H_
5#define LIBDEX_SHA1_H_
The Android Open Source Projectf6c38712009-03-03 19:28:47 -08006
Carl Shapirobfc97992011-04-27 14:16:08 -07007struct SHA1_CTX {
The Android Open Source Projectf6c38712009-03-03 19:28:47 -08008 unsigned long state[5];
9 unsigned long count[2];
10 unsigned char buffer[64];
Carl Shapirobfc97992011-04-27 14:16:08 -070011};
The Android Open Source Projectf6c38712009-03-03 19:28:47 -080012
13#define HASHSIZE 20
14
15void SHA1Init(SHA1_CTX* context);
16void SHA1Update(SHA1_CTX* context, const unsigned char* data,
17 unsigned long len);
18void SHA1Final(unsigned char digest[HASHSIZE], SHA1_CTX* context);
19
Carl Shapiro375fb112011-06-14 20:31:24 -070020#endif // LIBDEX_SHA1_H_