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