11802Sphk/* MD4.H - header file for MD4C.C
250476Speter * $FreeBSD: stable/10/lib/libmd/md4.h 314157 2017-02-23 18:54:33Z avg $
31802Sphk */
41802Sphk
51802Sphk/* Copyright (C) 1991-2, RSA Data Security, Inc. Created 1991. All
61802Sphk   rights reserved.
71802Sphk
81802Sphk   License to copy and use this software is granted provided that it
91802Sphk   is identified as the "RSA Data Security, Inc. MD4 Message-Digest
101802Sphk   Algorithm" in all material mentioning or referencing this software
111802Sphk   or this function.
121802Sphk   License is also granted to make and use derivative works provided
131802Sphk   that such works are identified as "derived from the RSA Data
141802Sphk   Security, Inc. MD4 Message-Digest Algorithm" in all material
151802Sphk   mentioning or referencing the derived work.
161802Sphk
171802Sphk   RSA Data Security, Inc. makes no representations concerning either
181802Sphk   the merchantability of this software or the suitability of this
191802Sphk   software for any particular purpose. It is provided "as is"
201802Sphk   without express or implied warranty of any kind.
211802Sphk
221802Sphk   These notices must be retained in any copies of any part of this
231802Sphk   documentation and/or software.
241802Sphk */
251802Sphk
261802Sphk#ifndef _MD4_H_
271802Sphk#define _MD4_H_
281802Sphk/* MD4 context. */
2912762Spetertypedef struct MD4Context {
3019099Sphk  u_int32_t state[4];	/* state (ABCD) */
3119099Sphk  u_int32_t count[2];	/* number of bits, modulo 2^64 (lsb first) */
321802Sphk  unsigned char buffer[64];	/* input buffer */
331802Sphk} MD4_CTX;
341802Sphk
3528688Sjoerg#include <sys/cdefs.h>
3628688Sjoerg
3728688Sjoerg__BEGIN_DECLS
38314144Savg
39314144Savg/* Ensure libmd symbols do not clash with libcrypto */
40314144Savg
41314157Savg#ifndef MD4Init
42314144Savg#define MD4Init		_libmd_MD4Init
43314157Savg#endif
44314157Savg#ifndef MD4Update
45314144Savg#define MD4Update	_libmd_MD4Update
46314157Savg#endif
47314157Savg#ifndef MD4Pad
48314144Savg#define MD4Pad		_libmd_MD4Pad
49314157Savg#endif
50314157Savg#ifndef MD4Final
51314144Savg#define MD4Final	_libmd_MD4Final
52314157Savg#endif
53314157Savg#ifndef MD4End
54314144Savg#define MD4End		_libmd_MD4End
55314157Savg#endif
56314157Savg#ifndef MD4File
57314144Savg#define MD4File		_libmd_MD4File
58314157Savg#endif
59314157Savg#ifndef MD4FileChunk
60314144Savg#define MD4FileChunk	_libmd_MD4FileChunk
61314157Savg#endif
62314157Savg#ifndef MD4Data
63314144Savg#define MD4Data		_libmd_MD4Data
64314157Savg#endif
65314144Savg
661802Sphkvoid   MD4Init(MD4_CTX *);
67154479Sphkvoid   MD4Update(MD4_CTX *, const void *, unsigned int);
6834909Sphkvoid   MD4Pad(MD4_CTX *);
691802Sphkvoid   MD4Final(unsigned char [16], MD4_CTX *);
709488Sphkchar * MD4End(MD4_CTX *, char *);
7128688Sjoergchar * MD4File(const char *, char *);
7274385Sphkchar * MD4FileChunk(const char *, char *, off_t, off_t);
73154479Sphkchar * MD4Data(const void *, unsigned int, char *);
7428688Sjoerg__END_DECLS
751802Sphk
761802Sphk#endif /* _MD4_H_ */
77