md5.h 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. /*
  2. * This is an OpenSSL-compatible implementation of the RSA Data Security, Inc.
  3. * MD5 Message-Digest Algorithm (RFC 1321).
  4. *
  5. * Homepage:
  6. * http://openwall.info/wiki/people/solar/software/public-domain-source-code/md5
  7. *
  8. * Author:
  9. * Alexander Peslyak, better known as Solar Designer <solar at openwall.com>
  10. *
  11. * This software was written by Alexander Peslyak in 2001. No copyright is
  12. * claimed, and the software is hereby placed in the public domain.
  13. * In case this attempt to disclaim copyright and place the software in the
  14. * public domain is deemed null and void, then the software is
  15. * Copyright (c) 2001 Alexander Peslyak and it is hereby released to the
  16. * general public under the following terms:
  17. *
  18. * Redistribution and use in source and binary forms, with or without
  19. * modification, are permitted.
  20. *
  21. * There's ABSOLUTELY NO WARRANTY, express or implied.
  22. *
  23. * See md5.c for more information.
  24. */
  25. #ifndef INTERNAL_MD5_H
  26. #define INTERNAL_MD5_H
  27. #include <sys/types.h>
  28. #include <stdint.h>
  29. struct MD5_CTX;
  30. #define MD5_LENGTH 16
  31. #ifdef __cplusplus
  32. extern "C" {
  33. #endif
  34. int MD5_Init(struct MD5_CTX **ctx);
  35. void MD5_Update(struct MD5_CTX *ctx, const void *data, size_t size);
  36. void MD5_Final(struct MD5_CTX *ctx, uint8_t *result);
  37. void MD5_Free(struct MD5_CTX **ctx);
  38. #ifdef __cplusplus
  39. } /* extern "C" */
  40. #endif
  41. #endif /* INTERNAL_MD5_H */