md5.h 827 B

12345678910111213141516171819202122232425262728293031
  1. /*
  2. * This file was transplanted with slight modifications from Linux sources
  3. * (fs/cifs/md5.h) into U-Boot by Bartlomiej Sieka <tur@semihalf.com>.
  4. */
  5. #ifndef _MD5_H
  6. #define _MD5_H
  7. #include <linux/types.h>
  8. struct MD5Context {
  9. __u32 buf[4];
  10. __u32 bits[2];
  11. unsigned char in[64];
  12. };
  13. /*
  14. * Calculate and store in 'output' the MD5 digest of 'len' bytes at
  15. * 'input'. 'output' must have enough space to hold 16 bytes.
  16. */
  17. void md5 (unsigned char *input, int len, unsigned char output[16]);
  18. /*
  19. * Calculate and store in 'output' the MD5 digest of 'len' bytes at 'input'.
  20. * 'output' must have enough space to hold 16 bytes. If 'chunk' Trigger the
  21. * watchdog every 'chunk_sz' bytes of input processed.
  22. */
  23. void md5_wd (unsigned char *input, int len, unsigned char output[16],
  24. unsigned int chunk_sz);
  25. #endif /* _MD5_H */