Subresource-Integrity-Generator
Erzeuge SRI-Werte für hochgeladene Assets.
So verwendest du Subresource-Integrity-Generator
Subresource integrity generator hashes a script, stylesheet or other file you select and returns an integrity value, such as sha384- followed by the base64 digest, ready for an integrity attribute. Choose SHA-384, the default, or SHA-256 or SHA-512. For cross-origin assets, pair it with the crossorigin attribute set to anonymous and confirm the server supports CORS.
- Wähle eine Quelldatei aus. Wenn das Tool mehrere Dateien akzeptiert, ordne sie in der gewünschten Reihenfolge an.
- Lege den Algorithmus fest.
- Führe „Subresource-Integrity-Generator“ aus, prüfe die Ausgabe und verwende dann die verfügbaren Bedienelemente zum Kopieren oder Herunterladen.
Was dieses Tool unterstützt
Erzeuge SRI-Werte für hochgeladene Assets.
- Algorithmus
- SHA-384 · SHA-256 · SHA-512
Grenzen und Verarbeitung
Bis zu 200 Dateien, je 20 MB und insgesamt 100 MB. PDFs sind auf 500 Seiten begrenzt, Kontaktbögen auf 100 Seiten und Lesezeichenbäume auf 1.000 Einträge und 20 Verschachtelungsebenen. Einzelne Vorgänge haben kleinere Ausgabelimits.
Häufige Fragen
Which hash algorithm should I choose for SRI?
SHA-384 is selected by default, and SHA-256 and SHA-512 are also available; all three are accepted in integrity attributes. The prefix in the output, such as sha512-, tells the browser which algorithm produced the digest.
Why does my SRI hash not match the CDN file?
The hash covers the exact bytes of the file you select. If the CDN serves a different version, build or line endings than your local copy, the values differ. Download the exact file URL you reference and hash that copy.
How do I add the integrity value to a script tag?
Copy the output into the integrity attribute of the script or link element. For files loaded from another origin, also add the crossorigin attribute with the value anonymous, which requires the server to send CORS headers.
Wo wird meine Eingabe verarbeitet?
Dieser Vorgang verarbeitet seine Quelle in deinem Browser. Kopieren und Herunterladen sind ausdrückliche Aktionen; die Quelleingabe wird nicht in einem Konto oder Verlauf gespeichert.
Welche Eingabelimits gelten?
Bis zu 200 Dateien, je 20 MB und insgesamt 100 MB. PDFs sind auf 500 Seiten begrenzt, Kontaktbögen auf 100 Seiten und Lesezeichenbäume auf 1.000 Einträge und 20 Verschachtelungsebenen. Einzelne Vorgänge haben kleinere Ausgabelimits.