A cryptographic hash can help compare content: hash the same bytes with the same algorithm and compare the results. If they match, the files are very likely identical under a modern collision-resistant hash; if they differ, something changed.
A plain hash does not encrypt data. Short or guessable inputs can be tested against known guesses, so never treat an ordinary hash of a password as secure password storage. Use a dedicated password-hashing scheme for that purpose. Choose a modern algorithm for integrity checks and verify the full file, not just its name.
Try a hash generator with public test data and compare the output with an independent implementation.