# Generatore integrità risorse

> Genera valori SRI per gli asset caricati.

[Open tool](https://www.toolcabana.com/it/subresource-integrity-generator) · [Educazione a privacy e sicurezza](https://www.toolcabana.com/it/category/privacy-and-security-education)

Tool ID: subresource-integrity-generator. Requested language: it. Description language: it. Complete guide translation: yes.

## Overview (en)

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.

## Supported tasks (it)

Genera valori SRI per gli asset caricati.

## Steps (it)

1. Scegli un file di origine. Se lo strumento accetta più file, disponili nell'ordine desiderato.
2. Imposta l'algoritmo.
3. Esegui Generatore integrità risorse, esamina il risultato, poi usa i controlli disponibili per copiare o scaricare.

## Settings

- Algoritmo (it; key: algorithm; type: select): SHA-384 [it], SHA-256 [it], SHA-512 [it]

## Limitations (it)

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.

## Privacy and connections (it)

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.

## Questions (it)

### 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.

## Related tools

- [File encryption and decryption](https://www.toolcabana.com/it/file-encryption-and-decryption)
- [Password strength estimator](https://www.toolcabana.com/it/password-strength-estimator)
- [Sensitive data masking tool](https://www.toolcabana.com/it/sensitive-data-masking-tool)
- [Content Security Policy analyzer](https://www.toolcabana.com/it/content-security-policy-analyzer)
