Use hashing for integrity
A SHA-256 digest helps verify whether a file or payload changed in transit.
A practical explanation of hashing, encryption, and when each one belongs in a developer workflow.
Hashing and encryption both transform data, but they solve different problems. Confusing them leads to bad architecture choices, especially around passwords, integrity checks, and secret storage.
The shortest distinction is this: encryption is reversible with a key, hashing is designed to be one-way.
Hashing turns input into a fixed-length digest intended for integrity checks, indexing, or password workflows.
Encryption transforms plaintext into ciphertext so the original data can be recovered later with the correct key.
A SHA-256 digest helps verify whether a file or payload changed in transit.
API tokens or stored secrets need a reversible scheme if the application must recover the original value.
Generate SHA-1, SHA-256 and SHA-512 hashes in the browser.
Open full tool pageNot usually. Encryption is reversible and serves confidentiality. Hashing is typically one-way and serves integrity or password verification workflows.
No, not by itself. Use a dedicated password hashing function such as bcrypt, scrypt, or Argon2.