1*0Sstevel@tonic-gate /* 2*0Sstevel@tonic-gate * Copyright 2003 Sun Microsystems, Inc. All rights reserved. 3*0Sstevel@tonic-gate * Use is subject to license terms. 4*0Sstevel@tonic-gate */ 5*0Sstevel@tonic-gate 6*0Sstevel@tonic-gate #pragma ident "%Z%%M% %I% %E% SMI" 7*0Sstevel@tonic-gate 8*0Sstevel@tonic-gate /* Copyright (C) 1991-2, RSA Data Security, Inc. Created 1991. All 9*0Sstevel@tonic-gate rights reserved. 10*0Sstevel@tonic-gate 11*0Sstevel@tonic-gate License to copy and use this software is granted provided that it 12*0Sstevel@tonic-gate is identified as the "RSA Data Security, Inc. MD5 Message-Digest 13*0Sstevel@tonic-gate Algorithm" in all material mentioning or referencing this software 14*0Sstevel@tonic-gate or this function. 15*0Sstevel@tonic-gate 16*0Sstevel@tonic-gate License is also granted to make and use derivative works provided 17*0Sstevel@tonic-gate that such works are identified as "derived from the RSA Data 18*0Sstevel@tonic-gate Security, Inc. MD5 Message-Digest Algorithm" in all material 19*0Sstevel@tonic-gate mentioning or referencing the derived work. 20*0Sstevel@tonic-gate 21*0Sstevel@tonic-gate RSA Data Security, Inc. makes no representations concerning either 22*0Sstevel@tonic-gate the merchantability of this software or the suitability of this 23*0Sstevel@tonic-gate software for any particular purpose. It is provided "as is" 24*0Sstevel@tonic-gate without express or implied warranty of any kind. 25*0Sstevel@tonic-gate These notices must be retained in any copies of any part of this 26*0Sstevel@tonic-gate documentation and/or software. 27*0Sstevel@tonic-gate */ 28*0Sstevel@tonic-gate 29*0Sstevel@tonic-gate #ifndef _MD5_PRIVATE_H 30*0Sstevel@tonic-gate #define _MD5_PRIVATE_H 31*0Sstevel@tonic-gate 32*0Sstevel@tonic-gate #ifdef _SUN_SDK_ 33*0Sstevel@tonic-gate #ifndef _MD5_H 34*0Sstevel@tonic-gate #include <md5.h> 35*0Sstevel@tonic-gate #endif /* _MD5_H */ 36*0Sstevel@tonic-gate 37*0Sstevel@tonic-gate #define _sasl_MD5Init(md5_ctx) MD5Init(md5_ctx) 38*0Sstevel@tonic-gate #define _sasl_MD5Update(md5_ctx, s, n) MD5Update(md5_ctx, s, n) 39*0Sstevel@tonic-gate #define _sasl_MD5Final(b, md5_ctx) MD5Final(b, md5_ctx) 40*0Sstevel@tonic-gate #else 41*0Sstevel@tonic-gate /* MD5 context. */ 42*0Sstevel@tonic-gate typedef struct { 43*0Sstevel@tonic-gate UINT4 state[4]; /* state (ABCD) */ 44*0Sstevel@tonic-gate UINT4 count[2]; /* number of bits, modulo 2^64 (lsb first) */ 45*0Sstevel@tonic-gate unsigned char buffer[64]; /* input buffer */ 46*0Sstevel@tonic-gate } MD5_CTX; 47*0Sstevel@tonic-gate 48*0Sstevel@tonic-gate void _sasl_MD5Init PROTO_LIST ((MD5_CTX *)); 49*0Sstevel@tonic-gate void _sasl_MD5Update PROTO_LIST 50*0Sstevel@tonic-gate ((MD5_CTX *, unsigned char *, unsigned int)); 51*0Sstevel@tonic-gate void _sasl_MD5Final PROTO_LIST ((unsigned char [16], MD5_CTX *)); 52*0Sstevel@tonic-gate 53*0Sstevel@tonic-gate void _sasl_hmac_md5 PROTO_LIST ((unsigned char *, int, unsigned char *, int, caddr_t)); 54*0Sstevel@tonic-gate #endif /* _SUN_SDK_ */ 55*0Sstevel@tonic-gate 56*0Sstevel@tonic-gate #endif /* _MD5_PRIVATE_H */ 57