mirror of
https://git.suyu.dev/suyu/breakpad.git
synced 2026-03-07 22:16:28 +00:00
Rename md5.c to md5.cc, put its contents inside the google_breakpad namespace.
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@887 4c0a9323-5329-0410-9bdc-e9ce6186880e
This commit is contained in:
@@ -51,6 +51,10 @@ extern "C" { // necessary for Leopard
|
||||
|
||||
namespace MacFileUtilities {
|
||||
|
||||
using google_breakpad::MD5Init;
|
||||
using google_breakpad::MD5Update;
|
||||
using google_breakpad::MD5Final;
|
||||
|
||||
MachoID::MachoID(const char *path)
|
||||
: memory_(0),
|
||||
memory_size_(0),
|
||||
|
||||
@@ -109,7 +109,7 @@ class MachoID {
|
||||
uint32_t crc_;
|
||||
|
||||
// The MD5 context
|
||||
MD5Context md5_context_;
|
||||
google_breakpad::MD5Context md5_context_;
|
||||
|
||||
// The current update to call from the Update callback
|
||||
UpdateFunction update_function_;
|
||||
|
||||
@@ -17,6 +17,8 @@
|
||||
|
||||
#include "common/md5.h"
|
||||
|
||||
namespace google_breakpad {
|
||||
|
||||
#ifndef WORDS_BIGENDIAN
|
||||
#define byteReverse(buf, len) /* Nothing */
|
||||
#else
|
||||
@@ -244,3 +246,6 @@ static void MD5Transform(u32 buf[4], u32 const in[16])
|
||||
buf[2] += c;
|
||||
buf[3] += d;
|
||||
}
|
||||
|
||||
} // namespace google_breakpad
|
||||
|
||||
@@ -5,6 +5,8 @@
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
namespace google_breakpad {
|
||||
|
||||
typedef uint32_t u32;
|
||||
typedef uint8_t u8;
|
||||
|
||||
@@ -14,18 +16,12 @@ struct MD5Context {
|
||||
u8 in[64];
|
||||
};
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif // __cplusplus
|
||||
|
||||
void MD5Init(struct MD5Context *ctx);
|
||||
|
||||
void MD5Update(struct MD5Context *ctx, unsigned char const *buf, unsigned len);
|
||||
|
||||
void MD5Final(unsigned char digest[16], struct MD5Context *ctx);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
} // namespace google_breakpad
|
||||
|
||||
#endif // COMMON_MD5_H__
|
||||
|
||||
Reference in New Issue
Block a user