MD5 digests of very big files

Alejandro Tejada capellan2000 at gmail.com
Mon Jun 28 15:17:31 EDT 2010


Hi Jan,

Jan Schenkel wrote:

> To make this future-proof, you might want to use
> the byte chunk type for reading from the binary file:
> read from file pFile for 4096 bytes  -- was: chars

[snip]

Great! :-D

Now the function will be:

function quasiMD5 pFile
-- posted by Mark Waddingham
  local tMD5s
  open file pFile for binary read
  repeat
    read from file pFile for 4096 bytes
    if it is empty then
      exit repeat
    end if
    put the md5digest of it after tMD5s
  end repeat
  close file pFile
  return the md5Digest of tMD5s
end quasiMD5

Only question left is:

How could we make this function return
the same result than command line programs
for big files like Linux ISO distros?

Thanks in advance!

Al



More information about the Use-livecode mailing list