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