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