1181624Skmacy/* MD4.H - header file for MD4C.C
2181624Skmacy * $FreeBSD: src/sys/sys/md4.h,v 1.2 2005/01/07 02:29:23 imp Exp $
3181624Skmacy */
4181624Skmacy
5181624Skmacy/*-
6181624Skmacy   Copyright (C) 1991-2, RSA Data Security, Inc. Created 1991. All
7181624Skmacy   rights reserved.
8181624Skmacy
9181624Skmacy   License to copy and use this software is granted provided that it
10181624Skmacy   is identified as the "RSA Data Security, Inc. MD4 Message-Digest
11181624Skmacy   Algorithm" in all material mentioning or referencing this software
12181624Skmacy   or this function.
13181624Skmacy   License is also granted to make and use derivative works provided
14181624Skmacy   that such works are identified as "derived from the RSA Data
15181624Skmacy   Security, Inc. MD4 Message-Digest Algorithm" in all material
16181624Skmacy   mentioning or referencing the derived work.
17181624Skmacy
18181624Skmacy   RSA Data Security, Inc. makes no representations concerning either
19181624Skmacy   the merchantability of this software or the suitability of this
20181624Skmacy   software for any particular purpose. It is provided "as is"
21181624Skmacy   without express or implied warranty of any kind.
22181624Skmacy
23181624Skmacy   These notices must be retained in any copies of any part of this
24251767Sgibbs   documentation and/or software.
25251767Sgibbs */
26251767Sgibbs
27181624Skmacy#ifndef _MD4_H_
28181624Skmacy#define _MD4_H_
29181624Skmacy/* MD4 context. */
30181624Skmacytypedef struct MD4Context {
31181624Skmacy  u_int32_t state[4];	/* state (ABCD) */
32181624Skmacy  u_int32_t count[2];	/* number of bits, modulo 2^64 (lsb first) */
33181624Skmacy  unsigned char buffer[64];	/* input buffer */
34181624Skmacy} MD4_CTX;
35181624Skmacy
36181624Skmacy#include <sys/cdefs.h>
37181624Skmacy
38181624Skmacy__BEGIN_DECLS
39181624Skmacyvoid   MD4Init(MD4_CTX *);
40181624Skmacyvoid   MD4Update(MD4_CTX *, const unsigned char *, unsigned int);
41181624Skmacyvoid   MD4Pad(MD4_CTX *);
42181624Skmacyvoid   MD4Final(unsigned char [16], MD4_CTX *);
43181624Skmacychar * MD4End(MD4_CTX *, char *);
44181624Skmacychar * MD4File(const char *, char *);
45181624Skmacychar * MD4Data(const unsigned char *, unsigned int, char *);
46181624Skmacy__END_DECLS
47181624Skmacy
48181624Skmacy#endif /* _MD4_H_ */
49181624Skmacy