11802Sphk/* MD4.H - header file for MD4C.C
250476Speter * $FreeBSD: stable/11/lib/libmd/md4.h 310372 2016-12-21 18:42:04Z emaste $
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
38282726Sthomas
39282726Sthomas/* Ensure libmd symbols do not clash with libcrypto */
40282726Sthomas
41282736Sthomas#ifndef MD4Init
42282726Sthomas#define MD4Init		_libmd_MD4Init
43282736Sthomas#endif
44282736Sthomas#ifndef MD4Update
45282726Sthomas#define MD4Update	_libmd_MD4Update
46282736Sthomas#endif
47282736Sthomas#ifndef MD4Pad
48282726Sthomas#define MD4Pad		_libmd_MD4Pad
49282736Sthomas#endif
50282736Sthomas#ifndef MD4Final
51282726Sthomas#define MD4Final	_libmd_MD4Final
52282736Sthomas#endif
53282736Sthomas#ifndef MD4End
54282726Sthomas#define MD4End		_libmd_MD4End
55282736Sthomas#endif
56310372Semaste#ifndef MD4Fd
57310372Semaste#define MD4Fd		_libmd_MD4Fd
58310372Semaste#endif
59310372Semaste#ifndef MD4FdChunk
60310372Semaste#define MD4FdChunk	_libmd_MD4FdChunk
61310372Semaste#endif
62282736Sthomas#ifndef MD4File
63282726Sthomas#define MD4File		_libmd_MD4File
64282736Sthomas#endif
65282736Sthomas#ifndef MD4FileChunk
66282726Sthomas#define MD4FileChunk	_libmd_MD4FileChunk
67282736Sthomas#endif
68282736Sthomas#ifndef MD4Data
69282726Sthomas#define MD4Data		_libmd_MD4Data
70282736Sthomas#endif
71282726Sthomas
721802Sphkvoid   MD4Init(MD4_CTX *);
73154479Sphkvoid   MD4Update(MD4_CTX *, const void *, unsigned int);
7434909Sphkvoid   MD4Pad(MD4_CTX *);
751802Sphkvoid   MD4Final(unsigned char [16], MD4_CTX *);
769488Sphkchar * MD4End(MD4_CTX *, char *);
77310372Semastechar * MD4Fd(int, char *);
78310372Semastechar * MD4FdChunk(int, char *, off_t, off_t);
7928688Sjoergchar * MD4File(const char *, char *);
8074385Sphkchar * MD4FileChunk(const char *, char *, off_t, off_t);
81154479Sphkchar * MD4Data(const void *, unsigned int, char *);
8228688Sjoerg__END_DECLS
831802Sphk
841802Sphk#endif /* _MD4_H_ */
85