Untie rbutil core logic from QtGui for cli:
[Rockbox.git] / rbutil / rbutilqt / irivertools / md5sum.h
bloba24c1a398993b5e8e37121dc41b5cc9119275ccd
1 /***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 * Module: rbutil
9 * File: md5sum.h
11 * Copyright (C) 2007 Dominik Wenger
13 * All files in this archive are subject to the GNU General Public License.
14 * See the file COPYING in the source tree root for full license agreement.
16 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
17 * KIND, either express or implied.
19 ****************************************************************************/
22 #ifndef MD5SUM_H_INCLUDED
23 #define MD5SUM_H_INCLUDED
25 #ifndef uint8
26 #define uint8 unsigned char
27 #endif
30 #ifndef uint32
31 #define uint32 unsigned long int
32 #endif
34 #include <QtCore>
36 typedef struct
38 uint32 total[2];
39 uint32 state[4];
40 uint8 buffer[64];
42 md5_context;
44 void md5_starts( md5_context *ctx );
45 void md5_update( md5_context *ctx, uint8 *input, uint32 length );
46 void md5_finish( md5_context *ctx, uint8 digest[16] );
48 int FileMD5(QString name, char *md5);
50 #endif // MD5SUM_H_INCLUDED