# Tuplehash xof compute

`tuplehash-xof-compute` · version 1.0.0 · Hashing & signatures · free, no key needed

Compute TupleHashXOF128 or TupleHashXOF256 with right_encode(0) XOF framing.

**Use when you need to: tuplehash-xof-compute · compute nist tuplehashxof · compute tuplehashxof128 or tuplehashxof256 with right_encode(0) xof framing..**

## Decide before calling

Read the [versioned contract](/v1/tools/tuplehash-xof-compute/versions/1.0.0) and the supported scope below. Reuse `tuplehash-xof-compute@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 `tuplehash-xof-compute@1.0.0` for tuplehash-xof-compute. 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

- tuplehash-xof-compute
- compute nist tuplehashxof
- compute tuplehashxof128 or tuplehashxof256 with right_encode(0) xof framing.
- compute TupleHashXOF128
- calculate customized TupleHashXOF256
- produce nist sp 800 185 tuplehash-xof-compute bytes

## Not supported

- KMAC or any keyed operation
- implicit algorithm detection
- streaming across calls

## Behavior

- All lengths passed to left_encode, right_encode, and encode_string are bit lengths where SP 800-185 requires bits.
- customization is UTF-8 text and defaults to the empty string; byte data supports utf8, canonical hex, or canonical padded base64.
- Outputs are lowercase hexadecimal and algorithm selection is explicit; keyed KMAC is unsupported.

## Input

- `tuples` (array of object, required): max items 64
- `security` (one of 128, 256, required)
- `output_bytes` (integer, required): min 1; max 1024
- `customization` (string, optional): max length 65536; default `""`

## Output

- `algorithm` (one of "TupleHashXOF128", "TupleHashXOF256", required)
- `input_bytes` (integer, required): min 0
- `output_bytes` (integer, required): min 1; max 1024
- `hex` (string, required): pattern `^[0-9a-f]+$`
- `standard` (constant "NIST SP 800-185 (December 2016)", required)
- `reference` (constant "Section 6", required)

## Limits

- max input bytes: 65536
- max output bytes: 1024
- max tuples: 64

## Example

Request input:

```json
{
  "tuples": [
    {
      "data": "000102",
      "encoding": "hex"
    },
    {
      "data": "101112131415",
      "encoding": "hex"
    }
  ],
  "security": 128,
  "output_bytes": 32
}
```

Response:

```json
{
  "result": {
    "algorithm": "TupleHashXOF128",
    "input_bytes": 9,
    "output_bytes": 32,
    "hex": "2f103cd7c32320353495c68de1a8129245c6325f6f2a3d608d92179c96e68488",
    "standard": "NIST SP 800-185 (December 2016)",
    "reference": "Section 6"
  }
}
```

## How to call it

### MCP

Connect `https://computefirst.net/mcp` ([setup](/docs#connect)), then call `execute` with:

```json
{
  "id": "tuplehash-xof-compute",
  "version": "1.0.0",
  "input": {
    "tuples": [
      {
        "data": "000102",
        "encoding": "hex"
      },
      {
        "data": "101112131415",
        "encoding": "hex"
      }
    ],
    "security": 128,
    "output_bytes": 32
  }
}
```

### HTTP (no key)

```sh
curl -X POST https://computefirst.net/v1/tools/tuplehash-xof-compute/versions/1.0.0/execute \
  -H "Content-Type: application/json" \
  -d '{"tuples":[{"data":"000102","encoding":"hex"},{"data":"101112131415","encoding":"hex"}],"security":128,"output_bytes":32}'
```

The machine-readable contract is at [/v1/tools/tuplehash-xof-compute/versions/1.0.0](/v1/tools/tuplehash-xof-compute/versions/1.0.0).

### CLI

```sh
node cli.mjs run tuplehash-xof-compute 1.0.0 --input input.json --base-url https://computefirst.net
```

Get the client at [/clients/cli/](/clients/cli/).

## Related tools

- [Parallelhash compute](/tools/parallelhash-compute): Compute fixed-output ParallelHash128 or ParallelHash256 with an explicit bounded block size.
- [Tuplehash compute](/tools/tuplehash-compute): Compute fixed-output TupleHash128 or TupleHash256 over an ordered tuple of byte strings.
- [Xxh3 128 compute](/tools/xxh3-128-compute): Compute the bit-exact XXH3 128-bit hash with a uint64 seed or public 192-byte custom secret.
- [Xxh3 64 compute](/tools/xxh3-64-compute): Compute the bit-exact XXH3 64-bit hash with a uint64 seed or public 192-byte custom secret.
- [Adler-32 combine compute](/tools/adler32-combine-compute): Combine two Adler-32 states without rereading either byte sequence.
- [Crc catalog compute](/tools/crc-catalog-compute): Compute a pinned RevEng CRC of hex bytes, including crossed-endian CRC-12/UMTS.
