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