md4.h 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. /* vim:set ts=2 sw=2 et cindent: */
  2. /* This Source Code Form is subject to the terms of the Mozilla Public
  3. * License, v. 2.0. If a copy of the MPL was not distributed with this
  4. * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
  5. #ifndef md4_h__
  6. #define md4_h__
  7. #ifdef __cplusplus
  8. extern "C" {
  9. #endif
  10. #include <stdint.h>
  11. /**
  12. * md4sum - computes the MD4 sum over the input buffer per RFC 1320
  13. *
  14. * @param input
  15. * buffer containing input data
  16. * @param inputLen
  17. * length of input buffer (number of bytes)
  18. * @param result
  19. * 16-byte buffer that will contain the MD4 sum upon return
  20. *
  21. * NOTE: MD4 is superceded by MD5. do not use MD4 unless required by the
  22. * protocol you are implementing (e.g., NTLM requires MD4).
  23. *
  24. * NOTE: this interface is designed for relatively small buffers. A streaming
  25. * interface would make more sense if that were a requirement. Currently, this
  26. * is good enough for the applications we care about.
  27. */
  28. void md4sum(const uint8_t *input, uint32_t inputLen, uint8_t *result);
  29. #ifdef __cplusplus
  30. }
  31. #endif
  32. #endif /* md4_h__ */