SHA-256 reduziert jede Eingabe auf einen festen 256-Bit-Fingerabdruck, geschrieben als vierundsechzig hexadezimale Zeichen. Dieselbe Eingabe ergibt stets denselben Wert, und jede noch so kleine Änderung — ein Zeichen, ein Bit — einen völlig anderen. Es ist konstruktionsbedingt einweg: Es gibt keinen Vorgang, der einen Wert zurück in den Text verwandelt, aus dem er stammt.
Gehasht wird mit der kryptografischen Implementierung des Browsers und nicht mit Code, der mit der Seite ausgeliefert wird — es ist also dieselbe geprüfte Implementierung, die auch der Rest der Plattform nutzt. Diese API steht nur in einem sicheren Kontext bereit, das Werkzeug setzt also voraus, dass die Seite über HTTPS ausgeliefert wird.
Wofür SHA-256 das Richtige ist
-
Es prüft Unversehrtheit, nicht Identität:
Den Wert einer Datei mit einem veröffentlichten zu vergleichen sagt Ihnen, dass die Datei unterwegs nicht verändert wurde. Über den Urheber sagt es nichts, sofern der Wert nicht selbst aus vertrauenswürdiger Quelle stammt.
-
Für die Passwortspeicherung ist es das falsche Werkzeug:
SHA-256 ist auf Geschwindigkeit ausgelegt — genau die Eigenschaft, die ein Angreifer beim Erraten von Passwörtern braucht. Passwortspeicherung verlangt eine absichtlich langsame Funktion wie bcrypt oder Argon2.
-
Der Wert hat feste Länge, was auch hineingeht:
Ein Zeichen und ein Gigabyte ergeben beide vierundsechzig hexadezimale Zeichen. Die Länge verrät nichts über die Größe des Gehashten.
-
Gleiche Eingaben ergeben gleiche Werte:
Das macht Hashing für Deduplizierung und Caching nützlich — und ist zugleich der Grund, warum das Hashen eines ungesalzenen Wertes ihn nicht verbirgt: Ein gängiger Wert lässt sich schlicht nachschlagen.
What a hash actually proves
The [msm_tool slug="sha256-hash-generator"] reduces any input, of any length, to a fixed 256-bit fingerprint written as sixty-four hexadecimal characters. Comparing a downloaded file's digest against one published by its source confirms the file was not altered in transit — it says nothing at all about who actually produced it, unless the published digest itself came from somewhere already trusted.
The wrong tool for storing a password
SHA-256 is built to run as fast as possible, which is exactly the property an attacker testing millions of guesses against a stolen password list wants to find. Password storage needs the opposite property — a function built to be deliberately slow, such as bcrypt or Argon2 — and using a fast general-purpose hash for that job undermines the one thing it is meant to protect.
The output length never changes
One character and an entire gigabyte both produce the same sixty-four hex characters, so the digest's length carries no information whatsoever about the size of whatever was hashed. There is no way to work backwards from a digest to even a rough sense of what went in.
Identical input always means identical output
The same text hashed twice produces the same digest every time, which is exactly what makes hashing useful for deduplication and caching — matching digests mean matching content without comparing the content itself. It is also why hashing a value on its own does not conceal it: a common password or a predictable string produces a digest that can simply be looked up against a precomputed list, which is the reason password hashing needs a salt and a slow function rather than a bare digest.
Computed in the browser, over HTTPS only
The hashing runs through the browser's own cryptography implementation rather than code shipped with the page, which means it is the same audited routine used elsewhere on the platform. That implementation is only exposed in a secure context, so the page has to be served over HTTPS for it to be available at all.
Against MD5
MD5 is broken in a way that matters in practice: two different inputs can be deliberately constructed to produce the same digest, which defeats the entire point of using one to verify integrity. SHA-256 has no equivalent practical weakness, which is the reason to reach for it instead wherever a choice is available.