2
0

md5.hpp 558 B

123456789101112131415161718
  1. #ifndef AFUN_MD5_HPP
  2. #define AFUN_MD5_HPP
  3. #include "aFunToolExport.h"
  4. /* md5计算工具 */
  5. #define READ_DATA_SIZE (1024)
  6. #define MD5_SIZE (16)
  7. #define MD5_STR_LEN (MD5_SIZE * 2) // md5str的长度
  8. #define MD5_STRING (MD5_STR_LEN + 1)
  9. typedef struct MD5_CTX MD5_CTX;
  10. AFUN_TOOL_EXPORT MD5_CTX *MD5Init(void);
  11. AFUN_TOOL_EXPORT void MD5Final(MD5_CTX *context, unsigned char digest[16]);
  12. AFUN_TOOL_EXPORT void MD5Update(MD5_CTX *context, unsigned char *input, unsigned int input_len);
  13. AFUN_TOOL_EXPORT char *getFileMd5(char *path);
  14. #endif //AFUN_MD5_HPP