md5.h 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. /*
  2. ***********************************************************************
  3. ** md5.h -- header file for implementation of MD5 **
  4. ** RSA Data Security, Inc. MD5 Message-Digest Algorithm **
  5. ** Created: 2/17/90 RLR **
  6. ** Revised: 12/27/90 SRD,AJ,BSK,JT Reference C version **
  7. ** Revised (for MD5): RLR 4/27/91 **
  8. ***********************************************************************
  9. */
  10. /*
  11. ***********************************************************************
  12. ** Copyright (C) 1990, RSA Data Security, Inc. All rights reserved. **
  13. ** **
  14. ** License to copy and use this software is granted provided that **
  15. ** it is identified as the "RSA Data Security, Inc. MD5 Message- **
  16. ** Digest Algorithm" in all material mentioning or referencing this **
  17. ** software or this function. **
  18. ** **
  19. ** License is also granted to make and use derivative works **
  20. ** provided that such works are identified as "derived from the RSA **
  21. ** Data Security, Inc. MD5 Message-Digest Algorithm" in all **
  22. ** material mentioning or referencing the derived work. **
  23. ** **
  24. ** RSA Data Security, Inc. makes no representations concerning **
  25. ** either the merchantability of this software or the suitability **
  26. ** of this software for any particular purpose. It is provided "as **
  27. ** is" without express or implied warranty of any kind. **
  28. ** **
  29. ** These notices must be retained in any copies of any part of this **
  30. ** documentation and/or software. **
  31. ***********************************************************************
  32. */
  33. #ifdef HAS_STDINT_H
  34. #include <stdint.h>
  35. #elif defined(HAS_INTTYPES_H)
  36. #include <inttypes.h>
  37. #endif
  38. /* typedef a 32-bit type */
  39. typedef uint32_t UINT4;
  40. /* Data structure for MD5 (Message-Digest) computation */
  41. typedef struct {
  42. UINT4 i[2]; /* number of _bits_ handled mod 2^64 */
  43. UINT4 buf[4]; /* scratch buffer */
  44. unsigned char in[64]; /* input buffer */
  45. unsigned char digest[16]; /* actual digest after MD5Final call */
  46. } MD5_CTX;
  47. void MD5Init (MD5_CTX *mdContext);
  48. void MD5Update (MD5_CTX *, unsigned const char *, unsigned int);
  49. void MD5Final (MD5_CTX *);
  50. /*
  51. ***********************************************************************
  52. ** End of md5.h **
  53. ******************************** (cut) ********************************
  54. */