What is a hash or checksum?
A hash algorithm turns input bytes into a fixed-length value. It can help you compare files or check whether text has changed. A matching checksum is useful only when the expected value comes from a source you trust.
Why does a tiny edit change the hash?
Changing one character, adding a space or using a different line ending changes the input bytes. Text here is encoded as UTF-8; file mode reads the file’s original bytes. If two tools disagree, first check that they hashed exactly the same data.
Which hash should I choose?
SHA-256 and SHA-512 are useful modern choices for many checksum tasks. MD5 and SHA-1 are included for compatibility with older systems, but should not be relied on for collision-resistant security. A checksum alone does not prove who created a file or that it is harmless.
Can I use these hashes to store passwords?
Use a dedicated password-hashing design instead of a fast general-purpose digest. Password storage needs appropriate work factors, salts and implementation choices. See OWASP’s password-storage guidance and the browser digest API documentation.