{"id":"sri-integrity-compute","version":"1.0.0","description":"Render one or more digests of content as a W3C Subresource Integrity 'integrity' attribute value.","supported_operations":["sri hash for a script tag","generate integrity attribute for a cdn link","sha384 sri value","compute subresource integrity hash","integrity= value for this file","sri metadata for multiple algorithms"],"unsupported_operations":["algorithms outside sha256/sha384/sha512 (md5 and sha1 are not W3C SRI algorithms)","fetching or hashing a remote URL (content must be supplied directly)"],"semantics":["algorithms defaults to ['sha384'] when omitted; order is preserved from the input, and duplicates are rejected, not silently deduplicated.","Each token is \"<algorithm>-<standard padded base64 of the raw digest bytes>\" (RFC 4648 section 4, padded, never base64url).","integrity is every token joined by a single ASCII space in the same order as algorithms; tokens reports the same digests as {algorithm, digest_base64} in that order.","content is decoded from content_encoding (utf8 default); the raw decoded bytes are hashed with no normalization or byte-order-mark handling."],"limits":{"max_content_bytes":262144},"pricing":{"status":"unpriced","charge_usd":null},"input_schema":{"type":"object","additionalProperties":false,"required":["content"],"properties":{"content":{"type":"string","maxLength":262144},"content_encoding":{"type":"string","enum":["utf8","hex","base64","base64url"],"default":"utf8"},"algorithms":{"type":"array","items":{"type":"string","enum":["sha256","sha384","sha512"]},"minItems":1,"maxItems":3,"uniqueItems":true,"default":["sha384"]}}},"output_schema":{"type":"object","additionalProperties":false,"required":["integrity","tokens"],"properties":{"integrity":{"type":"string","minLength":1},"tokens":{"type":"array","minItems":1,"maxItems":3,"items":{"type":"object","additionalProperties":false,"required":["algorithm","digest_base64"],"properties":{"algorithm":{"type":"string","enum":["sha256","sha384","sha512"]},"digest_base64":{"type":"string","minLength":1}}}}}},"examples":[{"input":{"content":"abc","algorithms":["sha256"]},"output":{"integrity":"sha256-ungWv48Bz+pBQUDeXa4iI7ADYaOWF3qctBD/YfIAFa0=","tokens":[{"algorithm":"sha256","digest_base64":"ungWv48Bz+pBQUDeXa4iI7ADYaOWF3qctBD/YfIAFa0="}]}},{"input":{"content":"abc"},"output":{"integrity":"sha384-ywB1P0WjXou1oD1pmsZQBycsMqsO3tFjGotgWkP/W+2AhgcroefMI1i67KE0yCWn","tokens":[{"algorithm":"sha384","digest_base64":"ywB1P0WjXou1oD1pmsZQBycsMqsO3tFjGotgWkP/W+2AhgcroefMI1i67KE0yCWn"}]}}],"execute_url":"/v1/tools/sri-integrity-compute/versions/1.0.0/execute"}