Generates a unique hash for the file. Also compares two files based on the hashes.