What is the fastest hash algorithm to check if two files are equal?
What is the fastest way to create a hash function which will be used to check if two files are equal? Security is not very important. Edit: I am sending a file over a network connection, and will be sure that the file on both sides are equal One approach might be to use a simple CRC-32 algorithm, and only if the CRC values compare equal, rerun the hash with a SHA1 or something more robust. A fast CRC-32 will outperform a cryptographically secure hash any day. Unless you're using a really complicated and/or slow hash, loading the data from the disk is going to take much longer than computing