What would be the easiest way to check if two files are identical. Mind you, this for server / client checks. basicly the server sends some code of the file and something about the file (lets say file size), and then client will check to see if it is the same or not, and if it is different, it will download it. But this ain't about getting the file sent over.

Simple put, what would be the best way to detect if a file is different. I have been trying modified dates, but many installers change the modified date depending on timezone from what I've seen, Ive also had one change it by simply seconds!

I've done file size before, but I've seen filesize sometimes doesn't 'change fully' if the change is something minor, (Like a couple things done in a image.)

I've hear of hash checks spitting out a 16 number code or something like that, but I've not been able to find it anywhere, google isn't my friend today.

Thanks!