1 /****************************************************************************************
2  * Copyright (c) 2006 Ian Monroe <ian@monroe.nu>                                        *
3  *                                                                                      *
4  * This program is free software; you can redistribute it and/or modify it under        *
5  * the terms of the GNU General Public License as published by the Free Software        *
6  * Foundation; either version 2 of the License, or (at your option) any later           *
7  * version.                                                                             *
8  *                                                                                      *
9  * This program is distributed in the hope that it will be useful, but WITHOUT ANY      *
10  * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A      *
11  * PARTICULAR PURPOSE. See the GNU General Public License for more details.             *
12  *                                                                                      *
13  * You should have received a copy of the GNU General Public License along with         *
14  * this program.  If not, see <http://www.gnu.org/licenses/>.                           *
15  ****************************************************************************************/
16 
17 #ifndef __MD5_H__
18 #define __MD5_H__
19 
20 #if defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L
21 #include <inttypes.h>
22 #else
23 typedef unsigned int uint32_t;
24 #endif
25 
26 #include "portability.h"
27 
28 typedef struct {
29     uint32_t buf[4];
30     uint32_t bits[2];
31     unsigned char in[64];
32     int apple_ver;
33 } MD5_CTX;
34 
35 void OpenDaap_MD5Init(MD5_CTX *, int apple_ver);
36 void OpenDaap_MD5Update(MD5_CTX *, const unsigned char *, unsigned int);
37 void OpenDaap_MD5Final(MD5_CTX *, unsigned char digest[16]);
38 
39 #endif /* __WINE_MD5_H__ */
40