md5_hash.h 972 B

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