Hash noncrypto compute
hash-noncrypto-compute · version 1.0.0 · Hashing & signatures · free, no key needed
Compute FNV-1/1a, MurmurHash3 or xxHash over encoded input bytes, with an optional seed for algorithms that take one.
Use when you need to: fnv1a hash of this string · murmurhash3 of this key · xxhash32 checksum.
Decide before calling
Read the versioned contract and the supported scope below. Reuse hash-noncrypto-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 hash-noncrypto-compute@1.0.0 for fnv1a hash of this string. 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
- fnv1a hash of this string
- murmurhash3 of this key
- xxhash32 checksum
- compute a shard key hash
- non-cryptographic hash for a cache key
- xxh64 of this text
- גיבוב לא קריפטוגרפי לצורך שיוך למחיצה
Not supported
- cryptographic or collision-resistant hashing (see hash-digest-compute)
- xxh3-64/xxh3-128 (not in this version; use xxh32 or xxh64)
Behavior
- algorithm fixes the output width: fnv1-32/fnv1a-32/murmur3-32/xxh32 are 32-bit; fnv1-64/fnv1a-64/xxh64 are 64-bit; murmur3-128-x64 is 128-bit as two 64-bit lanes.
- fnv1-32/fnv1a-32 use offset basis 0x811c9dc5 and prime 0x01000193 with 32-bit unsigned wraparound; fnv1-64/fnv1a-64 use offset basis 0xcbf29ce484222325 and prime 0x100000001b3 with 64-bit unsigned wraparound. FNV-1 multiplies then XORs the byte in; FNV-1a XORs the byte in then multiplies.
- fnv1-32, fnv1a-32, fnv1-64 and fnv1a-64 take no seed (the offset basis is fixed): seed must be omitted or exactly "0".
- murmur3-32 and murmur3-128-x64 take a 32-bit unsigned seed (0..4294967295, per the reference uint32_t seed signature, even though murmur3-128-x64 output is 128 bits); xxh32 also takes a 32-bit unsigned seed; xxh64 takes a 64-bit unsigned seed (0..18446744073709551615).
- seed is a decimal string (not a JSON number, to avoid IEEE-754 precision loss for 64-bit seeds); canonical form has no leading zeros (except the literal "0") and no sign. Omitting seed means "0".
- hex for the 32-bit algorithms is 8 lowercase hex digits, big-endian, of the unsigned result; for the 64-bit algorithms it is 16 lowercase hex digits, big-endian. For murmur3-128-x64, hex is 32 lowercase hex digits: the 16 raw output bytes of the reference MurmurHash3_x64_128 implementation in their native layout -- the h1 lane as 8 little-endian bytes, then the h2 lane as 8 little-endian bytes -- not a single big-endian 128-bit integer; this matches Python's mmh3 package and other common bindings.
- decimal is the unsigned base-10 string of the same value as hex for every algorithm with width <= 64 bits. For murmur3-128-x64 (width 128), decimal is null: the output is a 16-byte string, not a single scalar integer.
- Disclaimer: format transform only; provides no confidentiality, integrity, or authenticity.
Input
text(string, required): max length 262144input_encoding(one of "utf8", "hex", "base64", "base64url", optional): default"utf8"algorithm(one of "fnv1-32", "fnv1a-32", "fnv1-64", "fnv1a-64", "murmur3-32", "murmur3-128-x64", "xxh32", "xxh64", required)seed(string, optional): pattern^(0|[1-9][0-9]{0,20})$; default"0"
Output
algorithm(one of "fnv1-32", "fnv1a-32", "fnv1-64", "fnv1a-64", "murmur3-32", "murmur3-128-x64", "xxh32", "xxh64", required)seed(string, required): pattern^(0|[1-9][0-9]{0,20})$hex(string, required): pattern^[0-9a-f]+$decimal(string or null, required): pattern^(0|[1-9][0-9]*)$
Limits
- max input bytes: 16384
Example
Request input:
{
"text": "",
"algorithm": "fnv1-32"
}
Response:
{
"result": {
"algorithm": "fnv1-32",
"seed": "0",
"hex": "811c9dc5",
"decimal": "2166136261"
}
}
How to call it
MCP
Connect https://computefirst.net/mcp (setup), then call execute with:
{
"id": "hash-noncrypto-compute",
"version": "1.0.0",
"input": {
"text": "",
"algorithm": "fnv1-32"
}
}
HTTP (no key)
curl -X POST https://computefirst.net/v1/tools/hash-noncrypto-compute/versions/1.0.0/execute \
-H "Content-Type: application/json" \
-d '{"text":"","algorithm":"fnv1-32"}'
The machine-readable contract is at /v1/tools/hash-noncrypto-compute/versions/1.0.0.
CLI
node cli.mjs run hash-noncrypto-compute 1.0.0 --input input.json --base-url https://computefirst.net
Get the client at /clients/cli/.
Related tools
- Crc parametric compute: Compute a CRC using a named catalogue preset (CRC-8, CRC-16/ARC, CRC-32/ISO-HDLC, ...) or an explicit Rocksoft model.
- Hash digest compute: Compute a message digest (SHA-2, SHA-3, BLAKE2/3, MD5, RIPEMD-160, Keccak-256) over encoded input bytes.
- Git object id compute: Compute the Git object id git itself would give a blob, tree, commit or tag under Git's exact object framing.
- Hmac compute: Compute HMAC-SHA256/SHA512/MD5/SHA-1/SHA-3/RIPEMD-160 (RFC 2104) over encoded key and message bytes.
- Ipfs cid compute: Compute the CIDv0, CIDv1 dag-pb and CIDv1 raw content identifiers 'ipfs add' would give a single-chunk file.
- Merkle root compute: Compute a Merkle tree root (RFC 9162 or Bitcoin) from a leaf list, with an optional audit path.