md5.h 604 B

1234567891011121314151617181920212223
  1. #ifndef AFUN_MD5_H
  2. #define AFUN_MD5_H
  3. #include "aFunToolExport.h"
  4. /* md5计算工具 */
  5. namespace aFuntool {
  6. const int READ_DATA_SIZE = 1024;
  7. const int MD5_SIZE = 16;
  8. const int MD5_STR_LEN = MD5_SIZE * 2;
  9. const int MD5_STRING = MD5_STR_LEN + 1;
  10. typedef struct MD5_CTX MD5_CTX;
  11. AFUN_TOOL_EXPORT MD5_CTX *MD5Init();
  12. AFUN_TOOL_EXPORT void MD5Final(MD5_CTX *context, unsigned char digest[16]);
  13. AFUN_TOOL_EXPORT void MD5Update(MD5_CTX *context, unsigned char *input, unsigned int input_len);
  14. template <typename T>
  15. T getFileMd5 (T &path);
  16. }
  17. #endif //AFUN_MD5_H