The three essential properties are preimage resistance (a digest reveals nothing about its input), second-preimage resistance (no different input with the same digest can be found for a given input), and collision resistance (no two inputs with the same digest can be found at all). Algorithms such as MD5 and SHA-1 have failed these properties and must not be used where they matter.
Hashing appears throughout security: integrity checks and tamper evidence, digital signatures that sign digests rather than whole messages, content addressing, and — with deliberate extra work — password storage. Passwords need salted, computationally expensive functions such as dedicated password-hashing algorithms; a fast general-purpose hash is the wrong tool for that specific job.
Key points
Integrity useA matching digest confirms that content has not changed since the digest was computed — provided the digest itself was obtained through a trusted channel.
Password storageStore salted, slow-hash digests rather than fast hashes; the salt defeats precomputed lookups and the cost slows brute-force guessing at scale.
Algorithm selectionUse current approved families (SHA-2, SHA-3) and treat MD5 and SHA-1 as broken for security purposes — they remain acceptable only for non-adversarial checksums.
Important limitationA hash proves only that two inputs matched under one function at one time. It provides no confidentiality — the digest of a guessable input is trivially recovered by trying candidates — and a hash computed over an untrusted channel can be swapped along with the content it vouches for.