Generatore integrità risorse
Genera valori SRI per gli asset caricati.
Come usare Generatore integrità risorse
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.
- Scegli un file di origine. Se lo strumento accetta più file, disponili nell'ordine desiderato.
- Imposta l'algoritmo.
- Esegui Generatore integrità risorse, esamina il risultato, poi usa i controlli disponibili per copiare o scaricare.
Cosa supporta questo strumento
Genera valori SRI per gli asset caricati.
- Algoritmo
- SHA-384 · SHA-256 · SHA-512
Limiti ed elaborazione
Fino a 200 file, 20 MB ciascuno e 100 MB in totale. I PDF sono limitati a 500 pagine, i fogli di contatto a 100 pagine e gli alberi dei segnalibri a 1.000 voci e 20 livelli di annidamento. Le singole operazioni applicano limiti di output inferiori.
Domande frequenti
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.
Dove viene elaborato il mio input?
Questa operazione elabora i dati di origine nel tuo browser. Copia e download sono azioni esplicite; l'input di origine non viene salvato in un account né in una cronologia.
Quali sono i limiti di input?
Fino a 200 file, 20 MB ciascuno e 100 MB in totale. I PDF sono limitati a 500 pagine, i fogli di contatto a 100 pagine e gli alberi dei segnalibri a 1.000 voci e 20 livelli di annidamento. Le singole operazioni applicano limiti di output inferiori.