md5.h 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. /* MD5.H - header file for MD5C.C
  2. */
  3. /* Copyright (C) 1991-2, RSA Data Security, Inc. Created 1991. All
  4. rights reserved.
  5. License to copy and use this software is granted provided that it
  6. is identified as the "RSA Data Security, Inc. MD5 Message-Digest
  7. Algorithm" in all material mentioning or referencing this software
  8. or this function.
  9. License is also granted to make and use derivative works provided
  10. that such works are identified as "derived from the RSA Data
  11. Security, Inc. MD5 Message-Digest Algorithm" in all material
  12. mentioning or referencing the derived work.
  13. RSA Data Security, Inc. makes no representations concerning either
  14. the merchantability of this software or the suitability of this
  15. software for any particular purpose. It is provided "as is"
  16. without express or implied warranty of any kind.
  17. These notices must be retained in any copies of any part of this
  18. documentation and/or software.
  19. */
  20. #ifndef __MD5_H__
  21. #define __MD5_H__
  22. #include "hexport.h"
  23. /* POINTER defines a generic pointer type */
  24. typedef unsigned char *POINTER;
  25. /* UINT2 defines a two byte word */
  26. typedef unsigned short int UINT2;
  27. /* UINT4 defines a four byte word */
  28. typedef unsigned long int UINT4;
  29. /* MD5 context. */
  30. typedef struct {
  31. UINT4 state[4]; /* state (ABCD) */
  32. UINT4 count[2]; /* number of bits, modulo 2^64 (lsb first) */
  33. unsigned char buffer[64]; /* input buffer */
  34. } MD5_CTX;
  35. BEGIN_EXTERN_C
  36. HV_EXPORT void MD5Init(MD5_CTX *);
  37. HV_EXPORT void MD5Update(MD5_CTX *, unsigned char *, unsigned int);
  38. HV_EXPORT void MD5Final(unsigned char [16], MD5_CTX *);
  39. END_EXTERN_C
  40. #endif // __MD5_H__