37 #include "external/md5/md5.c" 44 sprintf ( sum,
"%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x",
52 MD5Context md5context;
54 MD5Update(&md5context, (
unsigned char*)buffer, len);
55 MD5Final(
mMD5,&md5context);
60 const int CHUNK_SIZE = 128*1024;
61 std::vector<unsigned char> buffer;
62 buffer.resize(CHUNK_SIZE);
63 MD5Context md5context;
66 for(
unsigned bytes_read = (
unsigned)file->
read(&buffer.front(), CHUNK_SIZE);
68 bytes_read = (unsigned)file->
read(&buffer.front(), CHUNK_SIZE) )
70 MD5Update(&md5context, &buffer.front(), bytes_read);
73 MD5Final(
mMD5,&md5context);
long long read(void *buffer, long long byte_count)
Reads byte_count bytes from a file. Returns the number of bytes actually read.
An abstract class representing a file.
void compute(void *buffer, int len)
std::string toStdString() const
Visualization Library main namespace.