Multihash digest verify
multihash-digest-verify · version 1.0.0 · Hashing & signatures · free, no key needed
Verify exact digest bytes and optional algorithm against a canonical multihash.
Use when you need to: verify digest matches multihash · detect multihash algorithm confusion · compare digest bytes with multihash.
Decide before calling
Read the versioned contract and the supported scope below. Reuse multihash-digest-verify@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 multihash-digest-verify@1.0.0 for verify digest matches multihash. 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
- verify digest matches multihash
- detect multihash algorithm confusion
- compare digest bytes with multihash
- check multihash digest equality
- validate expected multihash algorithm
- audit content address digest envelope
Not supported
- hashing message content
- signature or identity verification
Behavior
- A well-typed mismatch, including an explicit different algorithm, returns valid false.
- Malformed or noncanonical multihashes throw invalid_input.
- Verification is security-sensitive; callers must separately enforce an acceptable algorithm policy.
Input
multihash(string, required): max length 136; pattern^(?:[0-9a-f]{2})*$digest(string, required): max length 128; pattern^(?:[0-9a-f]{2})*$algorithm(one of "sha2-256", "sha2-512", "sha3-512", "sha3-384", "sha3-256", "sha3-224", "blake3", "blake2b-256", "blake2b-512", "blake2s-256", optional)
Output
valid(boolean, required)algorithm(string, required)code(integer, required): min 0digest_size(integer, required): min 0; max 64standard(string, required)reference(string, required)data_version(string, required)
Limits
- max multihash bytes: 68
- max digest bytes: 64
Example
Request input:
{
"multihash": "12200000000000000000000000000000000000000000000000000000000000000000",
"digest": "0000000000000000000000000000000000000000000000000000000000000000"
}
Response:
{
"result": {
"valid": true,
"algorithm": "sha2-256",
"code": 18,
"digest_size": 32,
"standard": "Multiformats Multihash specification",
"reference": "multihash = varint(code) || varint(size) || digest; unsigned LEB128 must be minimally encoded",
"data_version": "multicodec-2026-10-24"
}
}
How to call it
MCP
Connect https://computefirst.net/mcp (setup), then call execute with:
{
"id": "multihash-digest-verify",
"version": "1.0.0",
"input": {
"multihash": "12200000000000000000000000000000000000000000000000000000000000000000",
"digest": "0000000000000000000000000000000000000000000000000000000000000000"
}
}
HTTP (no key)
curl -X POST https://computefirst.net/v1/tools/multihash-digest-verify/versions/1.0.0/execute \
-H "Content-Type: application/json" \
-d '{"multihash":"12200000000000000000000000000000000000000000000000000000000000000000","digest":"0000000000000000000000000000000000000000000000000000000000000000"}'
The machine-readable contract is at /v1/tools/multihash-digest-verify/versions/1.0.0.
CLI
node cli.mjs run multihash-digest-verify 1.0.0 --input input.json --base-url https://computefirst.net
Get the client at /clients/cli/.
Related tools
- Oci descriptor verify: Verify supplied bytes against an OCI descriptor digest and size.
- Multihash decode: Strictly decode a canonical bounded hexadecimal multihash.
- Xxh3 vector suite verify: Verify a bounded public suite of expected XXH3-64 and XXH3-128 known-answer vectors.
- Adler-32 chunks verify: Verify that an ordered chunk list and a whole message have identical Adler-32 checksums.
- Crc catalog check: Compare a claimed CRC with one pinned RevEng model, including CRC-12/UMTS.
- Hash digest verify: Recompute a fixed-length digest over encoded input bytes and compare it to an expected digest given in any encoding.