md5_hash.h 593 B

12345678910111213141516171819202122232425262728
  1. /*
  2. * MD5 hash implementation and interface functions
  3. * Copyright (c) 2003-2005, Jouni Malinen <j@w1.fi>
  4. *
  5. * This software may be distributed under the terms of the BSD license.
  6. * See README for more details.
  7. */
  8. #pragma once
  9. #include <stdint.h>
  10. #ifdef __cplusplus
  11. extern "C" {
  12. #endif
  13. struct MD5Context {
  14. uint32_t buf[4];
  15. uint32_t bits[2];
  16. uint8_t in[64];
  17. };
  18. void MD5Init(struct MD5Context *context);
  19. void MD5Update(struct MD5Context *context, unsigned char const *buf, unsigned len);
  20. void MD5Final(unsigned char digest[16], struct MD5Context *context);
  21. #ifdef __cplusplus
  22. }
  23. #endif