md5.h 1.0 KB

1234567891011121314151617181920212223242526272829303132
  1. /* See md5.c for explanation and copyright information. */
  2. #ifndef YASM_MD5_H
  3. #define YASM_MD5_H
  4. #ifndef YASM_LIB_DECL
  5. #define YASM_LIB_DECL
  6. #endif
  7. /* Unlike previous versions of this code, uint32 need not be exactly
  8. 32 bits, merely 32 bits or more. Choosing a data type which is 32
  9. bits instead of 64 is not important; speed is considerably more
  10. important. ANSI guarantees that "unsigned long" will be big enough,
  11. and always using it seems to have few disadvantages. */
  12. typedef struct yasm_md5_context {
  13. unsigned long buf[4];
  14. unsigned long bits[2];
  15. unsigned char in[64];
  16. } yasm_md5_context;
  17. YASM_LIB_DECL
  18. void yasm_md5_init(yasm_md5_context *context);
  19. YASM_LIB_DECL
  20. void yasm_md5_update(yasm_md5_context *context, unsigned char const *buf,
  21. unsigned long len);
  22. YASM_LIB_DECL
  23. void yasm_md5_final(unsigned char digest[16], yasm_md5_context *context);
  24. YASM_LIB_DECL
  25. void yasm_md5_transform(unsigned long buf[4], const unsigned char in[64]);
  26. #endif /* !YASM_MD5_H */