It is often desirable to verify that a file hasn't been modified in transmission or storage by untrusted parties, for example, to include malicious code such as viruses or backdoors.
For this purpose, cryptographic hash functions are employed often.