Mark Mentovai | 4febb34 | 2022-09-07 10:34:05 -0400 | [diff] [blame^] | 1 | // Copyright 2007 Google LLC |
luly81 | 265726e | 2007-05-03 20:45:27 +0000 | [diff] [blame] | 2 | // Author: liuli@google.com (Liu Li) |
mmentovai | 68004c8 | 2007-09-28 18:14:48 +0000 | [diff] [blame] | 3 | #ifndef COMMON_MD5_H__ |
4 | #define COMMON_MD5_H__ | ||||
luly81 | 265726e | 2007-05-03 20:45:27 +0000 | [diff] [blame] | 5 | |
Joshua Peraza | b7ce678 | 2021-05-20 15:26:09 -0700 | [diff] [blame] | 6 | #include <stddef.h> |
luly81 | 265726e | 2007-05-03 20:45:27 +0000 | [diff] [blame] | 7 | #include <stdint.h> |
8 | |||||
ted.mielczarek | 84571a2 | 2011-11-18 21:40:27 +0000 | [diff] [blame] | 9 | namespace google_breakpad { |
10 | |||||
luly81 | 265726e | 2007-05-03 20:45:27 +0000 | [diff] [blame] | 11 | typedef uint32_t u32; |
12 | typedef uint8_t u8; | ||||
13 | |||||
14 | struct MD5Context { | ||||
15 | u32 buf[4]; | ||||
16 | u32 bits[2]; | ||||
17 | u8 in[64]; | ||||
18 | }; | ||||
19 | |||||
luly81 | 265726e | 2007-05-03 20:45:27 +0000 | [diff] [blame] | 20 | void MD5Init(struct MD5Context *ctx); |
21 | |||||
dmaclach | 9315301 | 2014-02-18 22:52:02 +0000 | [diff] [blame] | 22 | void MD5Update(struct MD5Context *ctx, unsigned char const *buf, size_t len); |
luly81 | 265726e | 2007-05-03 20:45:27 +0000 | [diff] [blame] | 23 | |
24 | void MD5Final(unsigned char digest[16], struct MD5Context *ctx); | ||||
25 | |||||
ted.mielczarek | 84571a2 | 2011-11-18 21:40:27 +0000 | [diff] [blame] | 26 | } // namespace google_breakpad |
luly81 | 265726e | 2007-05-03 20:45:27 +0000 | [diff] [blame] | 27 | |
mmentovai | 68004c8 | 2007-09-28 18:14:48 +0000 | [diff] [blame] | 28 | #endif // COMMON_MD5_H__ |