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