md5.h 788 B

123456789101112131415161718192021222324252627282930313233343536
  1. #ifndef MD5_H
  2. #define MD5_H
  3. #include "pam_cc_compat.h"
  4. typedef unsigned int uint32;
  5. struct MD5Context {
  6. union {
  7. uint32 i[4];
  8. unsigned char c[16] PAM_ATTRIBUTE_ALIGNED(4);
  9. } buf;
  10. uint32 bits[2];
  11. union {
  12. uint32 i[16];
  13. unsigned char c[64] PAM_ATTRIBUTE_ALIGNED(4);
  14. } in;
  15. };
  16. #define MD5_DIGEST_LENGTH 16
  17. void MD5Init(struct MD5Context *);
  18. void MD5Update(struct MD5Context *, unsigned const char *, unsigned);
  19. void MD5Final(unsigned char digest[MD5_DIGEST_LENGTH], struct MD5Context *);
  20. void MD5Transform(uint32 buf[4], uint32 const in[MD5_DIGEST_LENGTH]);
  21. void MD5(unsigned const char *, unsigned, unsigned char digest[MD5_DIGEST_LENGTH]);
  22. /*
  23. * This is needed to make RSAREF happy on some MS-DOS compilers.
  24. */
  25. typedef struct MD5Context MD5_CTX;
  26. #endif /* MD5_H */