Hmac compute

hmac-compute · version 1.0.0 · Hashing & signatures · free, no key needed

Compute HMAC-SHA256/SHA512/MD5/SHA-1/SHA-3/RIPEMD-160 (RFC 2104) over encoded key and message bytes.

Use when you need to: compute hmac sha256 signature · sign this payload with hmac · hmac of a raw request body with a shared secret.

Decide before calling

Read the versioned contract and the supported scope below. Reuse hmac-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 hmac-compute@1.0.0 for compute hmac sha256 signature. 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

Not supported

Behavior

Input

Output

Limits

Example

Request input:

{
  "key": "0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b",
  "key_encoding": "hex",
  "message": "Hi There",
  "algorithm": "sha256"
}

Response:

{
  "result": {
    "algorithm": "sha256",
    "hex": "b0344c61d8db38535ca8afceaf0bf12b881dc200c9833da726e9376c2e32cff7",
    "base64": "sDRMYdjbOFNcqK/OrwvxK4gdwgDJgz2nJuk3bC4yz/c=",
    "base64url": "sDRMYdjbOFNcqK_OrwvxK4gdwgDJgz2nJuk3bC4yz_c",
    "mac_bytes": 32
  }
}

How to call it

MCP

Connect https://computefirst.net/mcp (setup), then call execute with:

{
  "id": "hmac-compute",
  "version": "1.0.0",
  "input": {
    "key": "0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b",
    "key_encoding": "hex",
    "message": "Hi There",
    "algorithm": "sha256"
  }
}

HTTP (no key)

curl -X POST https://computefirst.net/v1/tools/hmac-compute/versions/1.0.0/execute \
  -H "Content-Type: application/json" \
  -d '{"key":"0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b","key_encoding":"hex","message":"Hi There","algorithm":"sha256"}'

The machine-readable contract is at /v1/tools/hmac-compute/versions/1.0.0.

CLI

node cli.mjs run hmac-compute 1.0.0 --input input.json --base-url https://computefirst.net

Get the client at /clients/cli/.