md5c.h 960 B

12345678910111213141516171819202122232425262728293031323334
  1. #ifndef __MD5C_H__
  2. #define __MD5C_H__
  3. #define MD5_FILE_ENABLE 0
  4. /* POINTER defines a generic pointer type */
  5. typedef unsigned char * POINTER;
  6. /* UINT2 defines a two byte word */
  7. //typedef unsigned short int UINT2;
  8. /* UINT4 defines a four byte word */
  9. typedef unsigned long int UINT4;
  10. /* MD5 context. */
  11. typedef struct {
  12. UINT4 state[4]; /* state (ABCD) */
  13. UINT4 count[2]; /* number of bits, modulo 2^64 (lsb first) */
  14. unsigned char buffer[64]; /* input buffer */
  15. } MD5_CTX;
  16. void MD5Init (MD5_CTX *context);
  17. void MD5Update (MD5_CTX *context, unsigned char *input, unsigned int inputLen);
  18. void MD5UpdaterString(MD5_CTX *context,const char *string);
  19. void MD5Final (unsigned char digest[16], MD5_CTX *context);
  20. void MDString (char *string,unsigned char digest[16]);
  21. #if MD5_FILE_ENABLE
  22. int MD5FileUpdateFile (MD5_CTX *context,char *filename);
  23. int MD5File (char *filename,unsigned char digest[16]);
  24. #endif
  25. #endif