175374Sbp/* MD4.H - header file for MD4C.C
275374Sbp * $FreeBSD: stable/11/sys/sys/md4.h 309023 2016-11-22 20:28:17Z asomers $
375374Sbp */
475374Sbp
5139825Simp/*-
6139825Simp   Copyright (C) 1991-2, RSA Data Security, Inc. Created 1991. All
775374Sbp   rights reserved.
875374Sbp
975374Sbp   License to copy and use this software is granted provided that it
1075374Sbp   is identified as the "RSA Data Security, Inc. MD4 Message-Digest
1175374Sbp   Algorithm" in all material mentioning or referencing this software
1275374Sbp   or this function.
1375374Sbp   License is also granted to make and use derivative works provided
1475374Sbp   that such works are identified as "derived from the RSA Data
1575374Sbp   Security, Inc. MD4 Message-Digest Algorithm" in all material
1675374Sbp   mentioning or referencing the derived work.
1775374Sbp
1875374Sbp   RSA Data Security, Inc. makes no representations concerning either
1975374Sbp   the merchantability of this software or the suitability of this
2075374Sbp   software for any particular purpose. It is provided "as is"
2175374Sbp   without express or implied warranty of any kind.
2275374Sbp
2375374Sbp   These notices must be retained in any copies of any part of this
2475374Sbp   documentation and/or software.
2575374Sbp */
2675374Sbp
2775374Sbp#ifndef _MD4_H_
2875374Sbp#define _MD4_H_
2975374Sbp/* MD4 context. */
3075374Sbptypedef struct MD4Context {
3175374Sbp  u_int32_t state[4];	/* state (ABCD) */
3275374Sbp  u_int32_t count[2];	/* number of bits, modulo 2^64 (lsb first) */
3375374Sbp  unsigned char buffer[64];	/* input buffer */
3475374Sbp} MD4_CTX;
3575374Sbp
3675374Sbp#include <sys/cdefs.h>
3775374Sbp
3875374Sbp__BEGIN_DECLS
3975374Sbpvoid   MD4Init(MD4_CTX *);
4075374Sbpvoid   MD4Update(MD4_CTX *, const unsigned char *, unsigned int);
4175374Sbpvoid   MD4Pad(MD4_CTX *);
42309023Sasomersvoid   MD4Final(unsigned char [__min_size(16)], MD4_CTX *);
43300774Scem#ifndef _KERNEL
44300774Scemchar * MD4End(MD4_CTX *, char *);
45300774Scemchar * MD4File(const char *, char *);
46300774Scemchar * MD4Data(const unsigned char *, unsigned int, char *);
47300774Scem#endif
4875374Sbp__END_DECLS
4975374Sbp
5075374Sbp#endif /* _MD4_H_ */
51