# Gerador de integridade de sub-recursos (SRI)

> Gera valores SRI para os recursos enviados.

[Open tool](https://www.toolcabana.com/pt-br/subresource-integrity-generator) · [Educação em privacidade e segurança](https://www.toolcabana.com/pt-br/category/privacy-and-security-education)

Tool ID: subresource-integrity-generator. Requested language: pt-BR. Description language: pt-BR. 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 (pt-BR)

Gera valores SRI para os recursos enviados.

## Steps (pt-BR)

1. Escolha um arquivo de origem. Se a ferramenta aceitar vários arquivos, ordene-os como quiser.
2. Defina o algoritmo.
3. Execute o gerador de integridade de sub-recursos (SRI), revise a saída e use os controles disponíveis para copiar ou baixar.

## Settings

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

## Limitations (pt-BR)

Até 200 arquivos, 20 MB cada e 100 MB no total. Os PDFs são limitados a 500 páginas, as folhas de contato a 100 páginas e as árvores de favoritos a 1,000 entradas e 20 níveis de aninhamento. As operações individuais aplicam limites menores de saída.

## Privacy and connections (pt-BR)

Esta operação processa sua fonte no seu navegador. Copiar e baixar são ações explícitas; a entrada de origem não é salva em conta nem em histórico.

## Questions (pt-BR)

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

### Onde minha entrada é processada?

Esta operação processa sua fonte no seu navegador. Copiar e baixar são ações explícitas; a entrada de origem não é salva em conta nem em histórico.

### Quais são os limites de entrada?

Até 200 arquivos, 20 MB cada e 100 MB no total. Os PDFs são limitados a 500 páginas, as folhas de contato a 100 páginas e as árvores de favoritos a 1,000 entradas e 20 níveis de aninhamento. As operações individuais aplicam limites menores de saída.

## Related tools

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