md5.h 1018 B

123456789101112131415161718192021222324252627282930313233343536373839
  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. void GoodMD5Init(struct MD5Context *);
  17. void GoodMD5Update(struct MD5Context *, unsigned const char *, unsigned);
  18. void GoodMD5Final(unsigned char digest[16], struct MD5Context *);
  19. void GoodMD5Transform(uint32 buf[4], uint32 const in[16]);
  20. void BrokenMD5Init(struct MD5Context *);
  21. void BrokenMD5Update(struct MD5Context *, unsigned const char *, unsigned);
  22. void BrokenMD5Final(unsigned char digest[16], struct MD5Context *);
  23. void BrokenMD5Transform(uint32 buf[4], uint32 const in[16]);
  24. char *Goodcrypt_md5(const char *pw, const char *salt);
  25. char *Brokencrypt_md5(const char *pw, const char *salt);
  26. /*
  27. * This is needed to make RSAREF happy on some MS-DOS compilers.
  28. */
  29. typedef struct MD5Context MD5_CTX;
  30. #endif /* MD5_H */