What is a hash? Think of it like a fingerprint for text. Every text has a unique hash. Change just one letter and the hash is completely different.
Can you reverse it? NO. That's the whole point. You can create a hash from text, but you can never get the text back from a hash.
Real-world examples:
🔒 Passwords: Websites don't store your actual password. They store the hash. When you log in, they hash what you typed and compare. If it matches = correct password. Even if hackers steal the database, they only get hashes, not passwords.
📥 Downloads: You download a file. The website shows "SHA-256: abc123...". You hash the downloaded file. If it matches = file is not corrupted or tampered with.
📝 Contracts: Two people agree on a contract text. Both hash it. If hashes match = both have the exact same document. Nobody changed anything.
💻 Developers: API keys, webhook signatures, data integrity checks, Git commits (Git uses SHA-1 hashes!).
Which algorithm?
• SHA-256 = Best for most uses. Standard. Secure.
• SHA-512 = Even stronger. For maximum security.
• SHA-1 = Older. Git uses it. Not recommended for security.
• MD5 = Fast but broken. Don't use for security. OK for quick checksums.
Full Guide →