A hash is a one-way fingerprint used for integrity checks, signatures, and keyed authentication. Encryption is reversible with the right key. Neither one is a complete security system, and a general-purpose hash is not password storage.
What a hash is
A cryptographic hash takes an input of any size and produces a fixed-length output. The same input and algorithm produce the same digest every time. A small change in the input should produce a very different digest, a property often called the avalanche effect.
The operation is designed to be one-way. You can compare a digest with an expected value, but you cannot decrypt it back into the original. That is why a hash is useful for integrity checks: if a file changes, the recomputed digest should not match the trusted expected one.
What encryption is
Encryption transforms plaintext into ciphertext so that someone without the key cannot read it. It is reversible by design. The security depends on the algorithm, the key length, the mode of operation, how nonces or initialization vectors are handled, and how the key is stored and used.
Encryption can provide confidentiality, but it does not automatically provide integrity or authenticity. Modern designs often combine encryption with a message authentication code (AEAD) so that tampering is detected. A hash by itself does not hide data; it only produces a digest.
Encoding is not encryption or hashing
Base64, hexadecimal, and URL encoding change how data is represented. They do not add a key or a one-way function. Anyone can decode them. If a page describes Base64 as encryption, treat that as a warning sign.
Where hashes help
- File integrity: compare a downloaded file's digest with a value from a trusted source.
- Digital signatures: sign a digest rather than a large file; the signature protects integrity and authenticity when the key and verification chain are sound.
- HMAC: combine a hash with a shared secret to authenticate a message and detect tampering. HMAC is not the same as a plain hash.
- Content addressing: use a digest as an identifier for content in some storage and build systems.
- Password storage: only with a dedicated password-hashing scheme, a unique salt, and a deliberately expensive work factor. This is a separate design problem.
Why SHA-256 is not password storage
General-purpose hashes are designed to be fast. That is useful for file checks and terrible for password databases: an attacker with a stolen database can test a huge number of guesses quickly. Password storage needs a scheme designed to be slow and memory-hard, such as Argon2id, bcrypt, scrypt, or PBKDF2 with current parameters, plus a unique salt per password. The verification should happen server-side, with rate limiting and other controls.
Saving a SHA-256 digest of a password is not a safe shortcut. The hash tool is for text digests and file-style checks, not for protecting account passwords.
What a digest does and does not prove
A matching digest can show that two byte sequences are consistent with the same expected value. It does not prove who created the file, that the file is safe, or that the expected digest came from a trustworthy source. If an attacker can replace both the file and the expected value, the comparison tells you nothing useful.
For authenticity, use a signature or an authenticated channel and verify the key or certificate chain through a trusted path. For passwords, use a password-hashing scheme, not a file digest.
A small check we ran
In November 2026, the Signal Bench hash tool produced this SHA-256 digest for the text Signal Bench:
09f996835a71624fa348c79fdb672744da18a2e2ab31ef0fea6a847374c15733
We recomputed the same value with OpenSSL and with shasum -a 256; both matched. This is a correctness check for a simple ASCII input, not a test of every browser or encoding.
Limits
Hash and encryption choices depend on the threat model. A digest does not provide confidentiality. Encryption does not automatically authenticate the sender. A password hash is not a general-purpose file hash. If a decision affects safety, money, or records, use current guidance and, where appropriate, a qualified professional.
Common questions
Can I decrypt a SHA-256 hash?
No. A cryptographic hash is designed to be one-way. You can compare a digest with an expected value, but you cannot recover the original input from the digest alone.
Is SHA-256 safe for passwords?
Not by itself. It is fast and unsalted. Password storage needs a dedicated password-hashing scheme with a unique salt and a deliberately expensive work factor.
What is HMAC?
HMAC combines a cryptographic hash with a shared secret to authenticate a message. It can detect tampering by someone who does not have the key, but it is not the same as a plain hash or a digital signature.