blob: 9d1f59b526d9261f0dfa602ec8657ab7cb960d1f [file] [log] [blame]
Mark Mentovai4febb342022-09-07 10:34:05 -04001// Copyright 2007 Google LLC
luly81265726e2007-05-03 20:45:27 +00002// Author: liuli@google.com (Liu Li)
mmentovai68004c82007-09-28 18:14:48 +00003#ifndef COMMON_MD5_H__
4#define COMMON_MD5_H__
luly81265726e2007-05-03 20:45:27 +00005
Joshua Perazab7ce6782021-05-20 15:26:09 -07006#include <stddef.h>
luly81265726e2007-05-03 20:45:27 +00007#include <stdint.h>
8
ted.mielczarek84571a22011-11-18 21:40:27 +00009namespace google_breakpad {
10
luly81265726e2007-05-03 20:45:27 +000011typedef uint32_t u32;
12typedef uint8_t u8;
13
14struct MD5Context {
15 u32 buf[4];
16 u32 bits[2];
17 u8 in[64];
18};
19
luly81265726e2007-05-03 20:45:27 +000020void MD5Init(struct MD5Context *ctx);
21
dmaclach93153012014-02-18 22:52:02 +000022void MD5Update(struct MD5Context *ctx, unsigned char const *buf, size_t len);
luly81265726e2007-05-03 20:45:27 +000023
24void MD5Final(unsigned char digest[16], struct MD5Context *ctx);
25
ted.mielczarek84571a22011-11-18 21:40:27 +000026} // namespace google_breakpad
luly81265726e2007-05-03 20:45:27 +000027
mmentovai68004c82007-09-28 18:14:48 +000028#endif // COMMON_MD5_H__