a11y.skipToMainContent
1

分资源完整性生成器

为JavaScript和CSS文件生成子资源完整性(SRI)散列. 保护你的网站 不受CDN资源损害.

SRI Hash Generator
HTML Tag with Integrity

Note: This generates a placeholder hash. For real SRI, fetch the file and compute the hash server-side or use a build tool.

More options
Was this tool helpful?
Send output to:
Advertisement

How to use SRI Hash Generator

  1. 输入脚本或样式表的 URL.
  2. 选择散列算法(SHA-256,SHA-384,SHA-512).
  3. 点击生成创建 SRI 散列 .
  4. 用完整性属性复制 HTML 标记 .

{姓名}是什么来着?

Subresource Guide(SRI)是一个安全功能,允许浏览器验证从CDN获取的资源没有被篡改. 您在脚本或链接标记中添加一个完整性属性, 并带有预期文件内容的散列.

这个工具生成任何URL或文件内容的SRI散列(SHA-256,SHA-384,SHA-512). 它创建了完整的完整性属性值和带有交叉起源属性的HTML标记.

Advertisement

FAQ

我该用什么散列算法?
SHA-384被推荐为安全性和相容性的良好平衡. SHA-512提供最安全.
我需要交叉起源吗?
是——跨源词='anonymous'属性是性权利倡议使用跨源资源工作的必要条件.

Related tools

Author

NK
Prof. Noah Klein"The Privacy Guardian"

Cybersecurity Researcher & Privacy Advocate

Professor Klein holds a PhD in Information Security and has testified before EU parliamentary committees on data privacy legislation. He builds encryption tools for journalists, audits web applications for security flaws, and believes that privacy is not a feature but a fundamental right. His research has been cited in Wired, Nature, and The Guardian, and he advises nonprofits on responsible data stewardship.

Advertisement