Source code pulled from OpenBSD for OpenNTPD. The place to contribute to this code is via the OpenBSD CVS tree.
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.

44 lines
1.6 KiB

  1. /* MD4.H - header file for MD4C.C
  2. * $OpenBSD: md4.h,v 1.6 2002/02/16 21:27:17 millert Exp $
  3. */
  4. /* Copyright (C) 1991-2, RSA Data Security, Inc. Created 1991. All
  5. rights reserved.
  6. License to copy and use this software is granted provided that it
  7. is identified as the "RSA Data Security, Inc. MD4 Message-Digest
  8. Algorithm" in all material mentioning or referencing this software
  9. or this function.
  10. License is also granted to make and use derivative works provided
  11. that such works are identified as "derived from the RSA Data
  12. Security, Inc. MD4 Message-Digest Algorithm" in all material
  13. mentioning or referencing the derived work.
  14. RSA Data Security, Inc. makes no representations concerning either
  15. the merchantability of this software or the suitability of this
  16. software for any particular purpose. It is provided "as is"
  17. without express or implied warranty of any kind.
  18. These notices must be retained in any copies of any part of this
  19. documentation and/or software.
  20. */
  21. #ifndef _MD4_H_
  22. #define _MD4_H_
  23. /* MD4 context. */
  24. typedef struct MD4Context {
  25. u_int32_t state[4]; /* state (ABCD) */
  26. u_int64_t count; /* number of bits, modulo 2^64 */
  27. unsigned char buffer[64]; /* input buffer */
  28. } MD4_CTX;
  29. void MD4Init(MD4_CTX *);
  30. void MD4Update(MD4_CTX *, const unsigned char *, size_t);
  31. void MD4Final(unsigned char [16], MD4_CTX *);
  32. void MD4Transform(u_int32_t [4], const unsigned char [64]);
  33. char * MD4End(MD4_CTX *, char *);
  34. char * MD4File(char *, char *);
  35. char * MD4Data(const unsigned char *, size_t, char *);
  36. #endif /* _MD4_H_ */