md4.h revision 282726
11802Sphk/* MD4.H - header file for MD4C.C
250476Speter * $FreeBSD: head/lib/libmd/md4.h 282726 2015-05-10 13:21:36Z thomas $
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
41282726Sthomas#define MD4Init		_libmd_MD4Init
42282726Sthomas#define MD4Update	_libmd_MD4Update
43282726Sthomas#define MD4Pad		_libmd_MD4Pad
44282726Sthomas#define MD4Final	_libmd_MD4Final
45282726Sthomas#define MD4End		_libmd_MD4End
46282726Sthomas#define MD4File		_libmd_MD4File
47282726Sthomas#define MD4FileChunk	_libmd_MD4FileChunk
48282726Sthomas#define MD4Data		_libmd_MD4Data
49282726Sthomas
501802Sphkvoid   MD4Init(MD4_CTX *);
51154479Sphkvoid   MD4Update(MD4_CTX *, const void *, unsigned int);
5234909Sphkvoid   MD4Pad(MD4_CTX *);
531802Sphkvoid   MD4Final(unsigned char [16], MD4_CTX *);
549488Sphkchar * MD4End(MD4_CTX *, char *);
5528688Sjoergchar * MD4File(const char *, char *);
5674385Sphkchar * MD4FileChunk(const char *, char *, off_t, off_t);
57154479Sphkchar * MD4Data(const void *, unsigned int, char *);
5828688Sjoerg__END_DECLS
591802Sphk
601802Sphk#endif /* _MD4_H_ */
61