home *** CD-ROM | disk | FTP | other *** search
/ Geek Gadgets 1 / ADE-1.bin / ade-dist / cvs-1.8.7-src.tgz / tar.out / fsf / cvs / lib / md5.h < prev    next >
C/C++ Source or Header  |  1996-09-28  |  787b  |  32 lines

  1. #ifndef MD5_H
  2. #define MD5_H
  3.  
  4. #if SIZEOF_LONG == 4
  5. typedef unsigned long uint32;
  6. #else
  7. #if SIZEOF_INT == 4
  8. typedef unsigned int uint32;
  9. #else
  10. Congratulations!  You get to rewrite this code so that it does not require
  11. a 32-bit integer type!  (Or maybe you just need to reconfigure.)
  12. #endif
  13. #endif
  14.  
  15. struct MD5Context {
  16.     uint32 buf[4];
  17.     uint32 bits[2];
  18.     unsigned char in[64];
  19. };
  20.  
  21. void MD5Init PROTO((struct MD5Context *context));
  22. void MD5Update PROTO((struct MD5Context *context, unsigned char const *buf, unsigned len));
  23. void MD5Final PROTO((unsigned char digest[16], struct MD5Context *context));
  24. void MD5Transform PROTO((uint32 buf[4], uint32 const in[16]));
  25.  
  26. /*
  27.  * This is needed to make RSAREF happy on some MS-DOS compilers.
  28.  */
  29. typedef struct MD5Context MD5_CTX;
  30.  
  31. #endif /* !MD5_H */
  32.