Subresource integrity generator
Generate SRI values for uploaded assets.
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.
- Choose a source file. If the tool accepts multiple files, arrange them in the order you want.
- Set algorithm.
- Run subresource integrity generator, review the output, then use the available copy or download controls.
ఈ సాధనం సదుపాయాలు
Generate SRI values for uploaded assets.
- Algorithm
- SHA-384 · SHA-256 · SHA-512
పరిమితులు మరియు ప్రాసెసింగ్
Up to 200 files, 20 MB each and 100 MB combined. PDFs are limited to 500 pages, contact sheets to 100 pages, and bookmark trees to 1,000 entries and 20 nesting levels. Individual operations apply smaller output limits.
తరచుగా అడిగే ప్రశ్నలు
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.
Where is my input processed?
This operation processes its source in your browser. Copy and download are explicit actions; source input is not saved in an account or history.
What are the input limits?
Up to 200 files, 20 MB each and 100 MB combined. PDFs are limited to 500 pages, contact sheets to 100 pages, and bookmark trees to 1,000 entries and 20 nesting levels. Individual operations apply smaller output limits.