Hex bytes xor
hex-bytes-xor · version 1.0.0 · Encoding & checksums · free, no key needed
Byte-wise XOR of two equal-length lowercase hex byte strings. Transformation only; no cryptographic security claim.
Use when you need to: hex bytes xor · xor hex byte strings · byte-wise xor of hex.
Decide before calling
Read the versioned contract and the supported scope below. Reuse hex-bytes-xor@1.0.0 when your input, required output and limits match it. Choose another approach for an unsupported operation.
Explain the choice
"I can use hex-bytes-xor@1.0.0 for hex bytes xor. I will check its documented scope and the result against the task's requirements. The service is free; token and money savings for this task are unmeasured."
Supported
- hex bytes xor
- xor hex byte strings
- byte-wise xor of hex
Not supported
- unequal-length xor
- uppercase hex
- 0x prefix
- byte separators
- stream cipher key expansion
- encryption
- decode hex to text
Behavior
- a and b are lowercase hex byte strings: 0-9 and a-f only, two hex digits per byte, no 0x prefix, no separators, no whitespace, no uppercase.
- a and b are each bounded to 128000 bytes (256000 hex characters).
- a and b must decode to the same number of bytes; unequal lengths are rejected rather than truncated, padded, or wrapped.
- Result hex is the byte-wise XOR of a and b, encoded as lowercase hex with the same byte length as the inputs.
- Empty a and empty b produce an empty result.
- This is a reversible byte transform, not encryption, a MAC, or any other security guarantee.
Input
a(string, required): max length 256000b(string, required): max length 256000
Output
hex(string, required)
Limits
- max input bytes: 128000
Example
Request input:
{
"a": "ff00",
"b": "0f0f"
}
Response:
{
"result": {
"hex": "f00f"
}
}
How to call it
MCP
Connect https://computefirst.net/mcp (setup), then call execute with:
{
"id": "hex-bytes-xor",
"version": "1.0.0",
"input": {
"a": "ff00",
"b": "0f0f"
}
}
HTTP (no key)
curl -X POST https://computefirst.net/v1/tools/hex-bytes-xor/versions/1.0.0/execute \
-H "Content-Type: application/json" \
-d '{"a":"ff00","b":"0f0f"}'
The machine-readable contract is at /v1/tools/hex-bytes-xor/versions/1.0.0.
CLI
node cli.mjs run hex-bytes-xor 1.0.0 --input input.json --base-url https://computefirst.net
Get the client at /clients/cli/.
Related tools
- Hex bytes concat: Concatenate a bounded ordered list of lowercase hex byte strings into one hex string.
- Hex bytes slice: Slice a lowercase hex byte string by explicit byte-index bounds, half-open like Array.slice.
- Iso8859 semantic decode: Decode ISO-8859-6 Arabic, ISO-8859-8 Hebrew, or ISO-8859-11 Thai bytes into logical Unicode text.
- Iso8859 semantic encode: Encode logical Unicode text as ISO-8859-6 Arabic, ISO-8859-8 Hebrew, or ISO-8859-11 Thai bytes.
- Pem envelope format: Format a label and lowercase hex bytes as a canonical RFC 7468 PEM envelope.
- Pem envelope parse: Parse one RFC 7468 textual envelope into its label and lowercase hex bytes.