xref: /titanic_52/usr/src/lib/libmd/common/md4.h (revision ba2e4443695ee6a6f420a35cd4fc3d3346d22932)
1 /*
2  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
3  * Use is subject to license terms.
4  */
5 
6 #ifndef	__MD4_H
7 #define	__MD4_H
8 
9 #pragma ident	"%Z%%M%	%I%	%E% SMI"
10 
11 
12 /*
13  * MD4C.C - RSA Data Security, Inc., MD4 message-digest algorithm
14  */
15 
16 /*
17  * Copyright (C) 1990-2, RSA Data Security, Inc. All rights reserved.
18  *
19  * License to copy and use this software is granted provided that it
20  * is identified as the "RSA Data Security, Inc. MD4 Message-Digest
21  * Algorithm" in all material mentioning or referencing this software
22  * or this function.
23  *
24  * License is also granted to make and use derivative works provided
25  * that such works are identified as "derived from the RSA Data
26  * Security, Inc. MD4 Message-Digest Algorithm" in all material
27  * mentioning or referencing the derived work.
28  *
29  * RSA Data Security, Inc. makes no representations concerning either
30  * the merchantability of this software or the suitability of this
31  * software for any particular purpose. It is provided "as is"
32  * without express or implied warranty of any kind.
33  *
34  * These notices must be retained in any copies of any part of this
35  * documentation and/or software.
36  */
37 
38 #ifdef	__cplusplus
39 extern "C" {
40 #endif
41 
42 /* MD4 context. */
43 typedef struct {
44 	ulong_t state[4];	/* state (ABCD) */
45 	ulong_t count[2];	/* number of bits, modulo 2^64 (lsb first) */
46 	unsigned char buffer[64];	/* input buffer */
47 } MD4_CTX;
48 
49 void MD4Init(MD4_CTX *);
50 void MD4Update(MD4_CTX *, const void *_RESTRICT_KYWD, size_t);
51 void MD4Final(void *, MD4_CTX *);
52 
53 #ifdef	__cplusplus
54 }
55 #endif
56 
57 #endif	/* __MD4_H */
58