{"id":"crc-parametric-compute","version":"1.0.0","description":"Compute a CRC using a named catalogue preset (CRC-8, CRC-16/ARC, CRC-32/ISO-HDLC, ...) or an explicit Rocksoft model.","supported_operations":["crc16 modbus checksum","crc32c of this data","xmodem crc of a packet","compute crc with custom polynomial","kermit crc for this string","what is the crc-32 bzip2 checksum","בדוק CRC פרמטרי מותאם אישית"],"unsupported_operations":["CRC widths other than 8, 16, 32 or 64 (e.g. CRC-12, CRC-24)","catalogue presets outside the 12 pinned names (supply an explicit model for any other published variant)"],"semantics":["Exactly one of preset or model must be given; both or neither is invalid_input.","preset resolves to one of 12 fixed parameter sets; model lets the caller supply width (8, 16, 32 or 64) and poly/init/xorout directly as case-insensitive hex strings (1 to 16 digits, no \"0x\" prefix). A poly/init/xorout value that does not fit in width bits is invalid_input.","Algorithm (Rocksoft parametrised model, Ross N. Williams): initialize register R = init masked to width bits. For each input byte b: if refin, reverse its bits within 8 bits; inject it at the top of the register and shift 8 times, XORing in poly whenever the top bit is set (masked to width bits after every step). After all bytes: if refout, reflect the entire width-bit register once (not per byte). Finally R = R XOR xorout, masked to width bits.","hex and check are zero-padded to ceil(width/4) lowercase hex digits; decimal is the unsigned base-10 string of the same value.","check is the algorithm above applied to the fixed 9-byte ASCII input \"123456789\" using the resolved model, independent of the caller's text -- the same \"check\" value published CRC catalogues use to confirm a model or implementation.","model in the output always echoes the fully resolved parameters as lowercase hex with no leading-zero padding beyond the minimal digits needed to represent the value (so a preset's \"00\" init is echoed as \"0\"), whether the caller supplied preset or model.","Disclaimer: format transform only; provides no confidentiality, integrity, or authenticity."],"limits":{"max_input_bytes":16384},"pricing":{"status":"unpriced","charge_usd":null},"input_schema":{"type":"object","additionalProperties":false,"required":["text"],"oneOf":[{"additionalProperties":false,"required":["preset"],"properties":{"text":{"type":"string","maxLength":262144},"input_encoding":{"type":"string","enum":["utf8","hex","base64","base64url"],"default":"utf8"},"preset":{"type":"string","enum":["crc-8","crc-16/arc","crc-16/ibm-3740","crc-16/xmodem","crc-16/kermit","crc-16/modbus","crc-32/iso-hdlc","crc-32c","crc-32/bzip2","crc-32/mpeg-2","crc-64/ecma-182","crc-64/xz"]}}},{"additionalProperties":false,"required":["model"],"properties":{"text":{"type":"string","maxLength":262144},"input_encoding":{"type":"string","enum":["utf8","hex","base64","base64url"],"default":"utf8"},"model":{"type":"object","additionalProperties":false,"required":["width","poly","init","refin","refout","xorout"],"properties":{"width":{"type":"integer","enum":[8,16,32,64]},"poly":{"type":"string","pattern":"^[0-9a-fA-F]{1,16}$"},"init":{"type":"string","pattern":"^[0-9a-fA-F]{1,16}$"},"refin":{"type":"boolean"},"refout":{"type":"boolean"},"xorout":{"type":"string","pattern":"^[0-9a-fA-F]{1,16}$"}}}}}],"properties":{"text":{"type":"string","maxLength":262144},"input_encoding":{"type":"string","enum":["utf8","hex","base64","base64url"],"default":"utf8"},"preset":{"type":"string","enum":["crc-8","crc-16/arc","crc-16/ibm-3740","crc-16/xmodem","crc-16/kermit","crc-16/modbus","crc-32/iso-hdlc","crc-32c","crc-32/bzip2","crc-32/mpeg-2","crc-64/ecma-182","crc-64/xz"]},"model":{"type":"object","additionalProperties":false,"required":["width","poly","init","refin","refout","xorout"],"properties":{"width":{"type":"integer","enum":[8,16,32,64]},"poly":{"type":"string","pattern":"^[0-9a-fA-F]{1,16}$"},"init":{"type":"string","pattern":"^[0-9a-fA-F]{1,16}$"},"refin":{"type":"boolean"},"refout":{"type":"boolean"},"xorout":{"type":"string","pattern":"^[0-9a-fA-F]{1,16}$"}}}}},"output_schema":{"type":"object","additionalProperties":false,"required":["width","model","hex","decimal","check"],"properties":{"width":{"type":"integer","enum":[8,16,32,64]},"model":{"type":"object","additionalProperties":false,"required":["width","poly","init","refin","refout","xorout"],"properties":{"width":{"type":"integer","enum":[8,16,32,64]},"poly":{"type":"string","pattern":"^[0-9a-f]+$"},"init":{"type":"string","pattern":"^[0-9a-f]+$"},"refin":{"type":"boolean"},"refout":{"type":"boolean"},"xorout":{"type":"string","pattern":"^[0-9a-f]+$"}}},"hex":{"type":"string","pattern":"^[0-9a-f]+$"},"decimal":{"type":"string","pattern":"^(0|[1-9][0-9]*)$"},"check":{"type":"string","pattern":"^[0-9a-f]+$"}}},"examples":[{"input":{"text":"123456789","preset":"crc-32/iso-hdlc"},"output":{"width":32,"model":{"width":32,"poly":"4c11db7","init":"ffffffff","refin":true,"refout":true,"xorout":"ffffffff"},"hex":"cbf43926","decimal":"3421780262","check":"cbf43926"}},{"input":{"text":"abc","model":{"width":8,"poly":"07","init":"00","refin":false,"refout":false,"xorout":"00"}},"output":{"width":8,"model":{"width":8,"poly":"7","init":"0","refin":false,"refout":false,"xorout":"0"},"hex":"5f","decimal":"95","check":"f4"}}],"execute_url":"/v1/tools/crc-parametric-compute/versions/1.0.0/execute"}