Sony PlayStation2 Study
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

34 lines
882 B

4 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  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 "../base/basicTypes.h"
  8. struct MD5Context {
  9. uint32_t buf[4];
  10. uint32_t bits[2];
  11. union {
  12. uint8_t in[64];
  13. uint32_t in32[16];
  14. };
  15. };
  16. /*
  17. * Calculate and store in 'output' the MD5 digest of 'len' bytes at
  18. * 'input'. 'output' must have enough space to hold 16 bytes.
  19. */
  20. void md5 (unsigned char *input, int len, unsigned char output[16]);
  21. /*
  22. * Calculate and store in 'output' the MD5 digest of 'len' bytes at 'input'.
  23. * 'output' must have enough space to hold 16 bytes. If 'chunk' Trigger the
  24. * watchdog every 'chunk_sz' bytes of input processed.
  25. */
  26. void md5_wd (unsigned char *input, int len, unsigned char output[16],
  27. unsigned int chunk_sz);
  28. #endif /* _MD5_H */