2 * This file has been modified for the cdrkit suite.
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).
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.
13 /* See md5.c for explanation and copyright information. */
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;
25 struct mk_MD5Context {
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]);