{"id":"checksum-manifest-verify","version":"1.0.0","description":"Parse a GNU/BSD checksum manifest (sha256sum -c, tagged form) and verify caller-supplied file contents against it.","supported_operations":["verify sha256sums.txt against these files","check a checksums manifest","verify an md5sums file against these files","verify files against a bsd-style checksum file","which files in this checksum list do not match","אמת קובץ סכומי בדיקה מול קבצים"],"unsupported_operations":["downloading or reading the manifest or files from a URL or the filesystem (both are supplied directly)","verifying a detached PGP/GPG signature over the manifest itself"],"semantics":["The manifest is split on '\\n' (a trailing '\\r' before each '\\n' is stripped for CRLF tolerance); blank lines are skipped and do not count toward bad_lines or counts.manifest_lines.","Untagged GNU form: '<hex><SP><mode><name>', mode ' ' (text) or '*' (binary). A line starting with a literal backslash marks the escaped form '\\<hex><SP><mode><escaped-name>', decoded per the escaping rule. Every untagged line uses the caller-supplied `algorithm`; if any untagged line appears and algorithm was not given, that line is bad_lines reason 'algorithm_required'. A digest whose hex length does not match algorithm's fixed length is 'digest_wrong_length_for_algorithm'.","Tagged BSD/GNU form: '<TAG> (<name>) = <hex>', TAG one of MD5, SHA1, SHA224, SHA256, SHA384, SHA512, BLAKE2b (case-sensitive); an unrecognized tag is 'unknown_algorithm_tag'. GNU --tag output uses the same leading-backslash marker: with it, the remainder must match '<TAG> (<escaped-name>) = <hex>' and the name is decoded per the escaping rule; without it, <name> is verbatim (every backslash is literal). A line matching neither grammar is 'unparsable_line'.","Escaping rule (untagged and tagged alike): only a line whose first character is a backslash has an escaped name, decoded in one left-to-right pass: '\\\\' to '\\', '\\n' to LF, '\\r' to CR. Any other escape, or a trailing lone backslash, makes the line bad_lines reason 'unparsable_line'.","Every filename successfully parsed must be unique across the manifest; a repeat is that later line's bad_lines entry with reason 'duplicate_filename' (the first occurrence is unaffected).","For each distinct filename successfully parsed (first-appearance order), the tool looks it up in files[] by exact name. Missing -> status 'missing'. Present -> the content (decoded under content_encoding, default utf8) is hashed with the line's algorithm and compared to the line's hex digest (case-insensitive) with a constant-time comparison: 'ok' or 'mismatch'.","unlisted_files lists, in files[] order, every name in files[] that was never successfully parsed as a manifest filename.","valid is true only when at least one result was produced (counts.checked >= 1), every result is 'ok' and bad_lines is empty; an empty or blank-only manifest is a normal response with valid false, not an error. The tool still reports every result and bad_line rather than stopping at the first problem. unlisted_files does not affect valid.","A malformed or ambiguous manifest LINE is reported as a bad_lines entry, not a thrown error, matching sha256sum --check's own warn-and-continue behavior; invalid_input is reserved for malformed input at the API boundary (manifest not a string, an unknown field, a files[] entry missing a required field or with a duplicate name, a bad content_encoding, and so on).","Disclaimer: format transform only; provides no confidentiality, integrity, or authenticity."],"limits":{"max_manifest_bytes":65536,"max_manifest_lines":1000,"max_files":100,"max_total_file_bytes":262144},"pricing":{"status":"unpriced","charge_usd":null},"input_schema":{"type":"object","additionalProperties":false,"required":["manifest","files"],"properties":{"manifest":{"type":"string","maxLength":131072},"algorithm":{"type":"string","enum":["md5","sha1","sha224","sha256","sha384","sha512","blake2b-512"]},"files":{"type":"array","minItems":0,"maxItems":100,"items":{"type":"object","additionalProperties":false,"required":["name","content"],"properties":{"name":{"type":"string","minLength":1,"maxLength":1024},"content":{"type":"string","maxLength":349525},"content_encoding":{"type":"string","enum":["utf8","hex","base64","base64url"],"default":"utf8"}}}}}},"output_schema":{"type":"object","additionalProperties":false,"required":["valid","results","unlisted_files","bad_lines","counts"],"properties":{"valid":{"type":"boolean"},"results":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["name","status"],"properties":{"name":{"type":"string"},"status":{"type":"string","enum":["ok","mismatch","missing"]}}}},"unlisted_files":{"type":"array","items":{"type":"string"}},"bad_lines":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["line","reason"],"properties":{"line":{"type":"integer","minimum":1},"reason":{"type":"string","enum":["unparsable_line","algorithm_required","unknown_algorithm_tag","digest_wrong_length_for_algorithm","duplicate_filename"]}}}},"counts":{"type":"object","additionalProperties":false,"required":["manifest_lines","checked","ok","mismatch","missing","unlisted","bad_lines"],"properties":{"manifest_lines":{"type":"integer","minimum":0},"checked":{"type":"integer","minimum":0},"ok":{"type":"integer","minimum":0},"mismatch":{"type":"integer","minimum":0},"missing":{"type":"integer","minimum":0},"unlisted":{"type":"integer","minimum":0},"bad_lines":{"type":"integer","minimum":0}}}}},"examples":[{"input":{"manifest":"5891b5b522d5df086d0ff0b110fbd9d21bb4fc7163af34d08286a2e846f6be03  hello.txt\n","algorithm":"sha256","files":[{"name":"hello.txt","content":"hello\n"}]},"output":{"valid":true,"results":[{"name":"hello.txt","status":"ok"}],"unlisted_files":[],"bad_lines":[],"counts":{"manifest_lines":1,"checked":1,"ok":1,"mismatch":0,"missing":0,"unlisted":0,"bad_lines":0}}},{"input":{"manifest":"SHA256 (hello.txt) = 5891b5b522d5df086d0ff0b110fbd9d21bb4fc7163af34d08286a2e846f6be03\n","files":[{"name":"hello.txt","content":"hello\n"}]},"output":{"valid":true,"results":[{"name":"hello.txt","status":"ok"}],"unlisted_files":[],"bad_lines":[],"counts":{"manifest_lines":1,"checked":1,"ok":1,"mismatch":0,"missing":0,"unlisted":0,"bad_lines":0}}},{"input":{"manifest":"5891b5b522d5df086d0ff0b110fbd9d21bb4fc7163af34d08286a2e846f6be03  hello.txt\n","algorithm":"sha256","files":[]},"output":{"valid":false,"results":[{"name":"hello.txt","status":"missing"}],"unlisted_files":[],"bad_lines":[],"counts":{"manifest_lines":1,"checked":1,"ok":0,"mismatch":0,"missing":1,"unlisted":0,"bad_lines":0}}}],"execute_url":"/v1/tools/checksum-manifest-verify/versions/1.0.0/execute"}