md5_hash.h 800 B

1234567891011121314151617181920212223242526272829303132333435
  1. /*
  2. * MD5 internal definitions
  3. * Copyright (c) 2003-2005, Jouni Malinen <j@w1.fi>
  4. *
  5. * This program is free software; you can redistribute it and/or modify
  6. * it under the terms of the GNU General Public License version 2 as
  7. * published by the Free Software Foundation.
  8. *
  9. * Alternatively, this software may be distributed under the terms of BSD
  10. * license.
  11. *
  12. * See README and COPYING for more details.
  13. */
  14. #pragma once
  15. #include <stdint.h>
  16. #ifdef __cplusplus
  17. extern "C" {
  18. #endif
  19. struct MD5Context {
  20. uint32_t buf[4];
  21. uint32_t bits[2];
  22. uint8_t in[64];
  23. };
  24. void MD5Init(struct MD5Context *context);
  25. void MD5Update(struct MD5Context *context, unsigned char const *buf, unsigned len);
  26. void MD5Final(unsigned char digest[16], struct MD5Context *context);
  27. #ifdef __cplusplus
  28. }
  29. #endif