I want to be able to validate a large quantity of files (a couple of TB) on a semi regular basis via PHP. Security is not an issue and collisions isn’t a particularly big one either since it also factors in filesizes. The main goal is to generate the hashes quickly and with as little CPU as possible.
My current candidate is md5_file() but was wondering if there is another approach that could be more efficient?
If efficiency is an issue and security is not, how about simply the binary XOR of the files? Much faster.