Subresource Integrity (SRI) Generator

Subresource Integrity (SRI) Generator: Computes SHA-384 cryptographic digest and encodes result in standard Base64.

Loading tool module...

About this subresource integrity (sri) generator

Subresource Integrity (SRI) Generator — browser-based utility.

How this tool works

Implements client-side Subresource Integrity (SRI) Generator operations. Computes SHA-384 cryptographic digest and encodes result in standard Base64 specifically designed for a web developer generates a subresource integrity (sri) hash for an external cdn script tag.

  1. Credential & Payload Ingestion: Accepts raw request body strings, timestamp headers, and shared signing secrets.
  2. Canonical String Construction: Assembles the canonical signing payload (e.g. timestamp + '.' + body for Stripe signatures).
  3. Cryptographic Hash Evaluation: Uses Web Crypto subtle.sign with HMAC-SHA256 to compute the reference digest.
  4. Constant-Time Verification: Compares computed signature against received header using constant-time byte iteration.

Worked example

Scenario: A web developer generates a Subresource Integrity (SRI) hash for an external CDN script tag.

Sample input:

File Content: 'console.log("CZOA CDN Script");' | Algorithm: sha384

Processing: Computes SHA-384 cryptographic digest and encodes result in standard Base64.

Illustrative output:

integrity="sha384-y7d...=" crossorigin="anonymous"

Limits and verification

Requires exact raw byte representations of JSON bodies; any whitespace formatting change invalidates cryptographic HMAC signatures. Flags timestamp drift exceeding 5 minutes (300 seconds) to prevent replay attacks.

Examples demonstrate an expected workflow; they do not prove every input or every branch of an external specification. Check important results with an independent source before using them for money, security, compliance, safety, or irreversible file changes.

Browser processing boundary

Tool input is processed by code running in the browser and is not intentionally sent to a CZOA processing API. The page can still request ordinary site assets, analytics, or advertising when those services are enabled. Browser extensions and managed-device software remain outside this tool's control.

Relevant references

These references govern or help explain the format, protocol, or calculation used here. Listing a reference does not claim certification or complete implementation of every optional feature.

Content owner: CZOA Tools · Last reviewed: 2026-09-15 · Review methodology

How to use it

  1. Enter, paste, or select your input data into the Subresource Integrity (SRI) Generator workspace controls.
  2. Review available parameter fields, units, formats, or options configured for your task.
  3. Click the action button or observe immediate live calculations rendered in your browser runtime.
  4. Inspect the resulting output and any diagnostic messages, then copy or download the result if needed.

Frequently asked questions

What exact SRI value does this generator produce?+

It UTF-8 encodes the entered text, sends those bytes to Web Crypto SHA-384, Base64-encodes the digest, and prefixes the result with sha384-.

What did the SRI fixture independently verify?+

For the exact text CZOA, browser output matched the OpenSSL SHA-384 Base64 digest rCLwLojH3sEXAYvynN1a0fHv4lFgKaF6xix5gFMHBuu8GAEJDSB8yfd44cED7o+a.

Can it hash a URL or fetch a CDN asset?+

No. The input is text already present in the page. It does not download a remote script or stylesheet, follow redirects, inspect response bytes, or compare a published integrity attribute.

Does this interface choose other SRI algorithms?+

No. This implementation exposes SHA-384 output only. SHA-256 and SHA-512 attributes require a separately computed digest and byte-for-byte source control.