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:
ted.mielczarek
2011-11-18 21:40:27 +00:00
parent d529b2d0a0
commit 84571a2b91
12 changed files with 46 additions and 43 deletions

View File

@@ -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),

View File

@@ -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_;

View File

@@ -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

View File

@@ -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__