patch genisoimage multi extent
[platform/upstream/cdrkit.git] / genisoimage / md5.h
1 /*
2  * This file has been modified for the cdrkit suite.
3  *
4  * The behaviour and appearence of the program code below can differ to a major
5  * extent from the version distributed by the original author(s).
6  *
7  * For details, see Changelog file distributed with the cdrkit package. If you
8  * received this file from another source then ask the distributing person for
9  * a log of modifications.
10  *
11  */
12
13 /* See md5.c for explanation and copyright information.  */
14
15 #ifndef MD5_H
16 #define MD5_H
17
18 /* Unlike previous versions of this code, uint32 need not be exactly
19    32 bits, merely 32 bits or more.  Choosing a data type which is 32
20    bits instead of 64 is not important; speed is considerably more
21    important.  ANSI guarantees that "unsigned long" will be big enough,
22    and always using it seems to have few disadvantages.  */
23 typedef unsigned long mk_uint32;
24
25 struct mk_MD5Context {
26         mk_uint32 buf[4];
27         mk_uint32 bits[2];
28         unsigned char in[64];
29 };
30
31 void mk_MD5Init (struct mk_MD5Context *context);
32 void mk_MD5Update (struct mk_MD5Context *context,
33                            unsigned char const *buf, unsigned len);
34 void mk_MD5Final (unsigned char digest[16],
35                           struct mk_MD5Context *context);
36 void mk_MD5Transform (mk_uint32 buf[4], const unsigned char in[64]);
37 int mk_MD5Parse(unsigned char in[33], unsigned char out[16]);
38 int calculate_md5sum(char *filename, unsigned long long size, unsigned char out[16]);
39
40
41 #endif /* !MD5_H */