md5c.h 905 B

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