1 // Copyright 2007 Google Inc. All Rights Reserved.
2 // Author: liuli@google.com (Liu Li)
3 #ifndef COMMON_MD5_H__
4 #define COMMON_MD5_H__
5 
6 #include <stdint.h>
7 
8 typedef uint32_t u32;
9 typedef uint8_t u8;
10 
11 struct MD5Context {
12   u32 buf[4];
13   u32 bits[2];
14   u8 in[64];
15 };
16 
17 #ifdef __cplusplus
18 extern "C" {
19 #endif  // __cplusplus
20 
21 void MD5Init(struct MD5Context *ctx);
22 
23 void MD5Update(struct MD5Context *ctx, unsigned char const *buf, unsigned len);
24 
25 void MD5Final(unsigned char digest[16], struct MD5Context *ctx);
26 
27 #ifdef __cplusplus
28 }
29 #endif
30 
31 #endif  // COMMON_MD5_H__
32