xref: /titanic_50/usr/src/uts/common/sys/md4.h (revision 3c112a2b34403220c06c3e2fcac403358cfba168)
1 /*
2  * Copyright 2007 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 #include <sys/types.h>
43 
44 #define	MD4_DIGEST_LENGTH	16
45 
46 /* MD4 context. */
47 typedef struct {
48 	uint32_t state[4];	/* state (ABCD) */
49 	uint32_t count[2];	/* number of bits, modulo 2^64 (lsb first) */
50 	unsigned char buffer[64];	/* input buffer */
51 } MD4_CTX;
52 
53 void MD4Init(MD4_CTX *);
54 void MD4Update(MD4_CTX *, const void *_RESTRICT_KYWD, size_t);
55 void MD4Final(void *, MD4_CTX *);
56 
57 #ifdef	__cplusplus
58 }
59 #endif
60 
61 #endif	/* __MD4_H */
62