From 3568ef7ff9203741686e9e09f25b72c30c6550ea Mon Sep 17 00:00:00 2001 From: lyq Date: Tue, 13 Jan 2026 15:16:58 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9md5=E6=96=87=E4=BB=B6?= =?UTF-8?q?=E5=8F=98=E9=87=8F=E7=B1=BB=E5=9E=8B=E9=87=8D=E5=AE=9A=E4=B9=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../task_manager/include/task_manager/md5.h | 26 +++++++++---------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/src/communication/task_manager/include/task_manager/md5.h b/src/communication/task_manager/include/task_manager/md5.h index df10a8c..ff247fd 100644 --- a/src/communication/task_manager/include/task_manager/md5.h +++ b/src/communication/task_manager/include/task_manager/md5.h @@ -5,7 +5,7 @@ #include /* Type define */ -typedef unsigned char byte; +typedef unsigned char MD5_byte; typedef unsigned int uint32; using std::ifstream; @@ -22,30 +22,30 @@ public: void update(const void *input, size_t length); void update(const string &str); void update(ifstream &in); - const byte *digest(); + const MD5_byte *digest(); string toString(); void reset(); private: - void update(const byte *input, size_t length); + void update(const MD5_byte *input, size_t length); void final(); - void transform(const byte block[64]); - void encode(const uint32 *input, byte *output, size_t length); - void decode(const byte *input, uint32 *output, size_t length); - string bytesToHexString(const byte *input, size_t length); + void transform(const MD5_byte block[64]); + void encode(const uint32 *input, MD5_byte *output, size_t length); + void decode(const MD5_byte *input, uint32 *output, size_t length); + string bytesToHexString(const MD5_byte *input, size_t length); /* class uncopyable */ MD5(const MD5 &); MD5 &operator=(const MD5 &); private: - uint32 _state[4]; /* state (ABCD) */ - uint32 _count[2]; /* number of bits, modulo 2^64 (low-order word first) */ - byte _buffer[64]; /* input buffer */ - byte _digest[16]; /* message digest */ - bool _finished; /* calculate finished ? */ + uint32 _state[4]; /* state (ABCD) */ + uint32 _count[2]; /* number of bits, modulo 2^64 (low-order word first) */ + MD5_byte _buffer[64]; /* input buffer */ + MD5_byte _digest[16]; /* message digest */ + bool _finished; /* calculate finished ? */ - static const byte PADDING[64]; /* padding for calculate */ + static const MD5_byte PADDING[64]; /* padding for calculate */ static const char HEX[16]; enum {