{"uid":"cap_6ieYWuk22EpwYo_c0_w1q","slug":"fastx402-lab-hmac-sign-verify-9bd8664e","name":"FastX402 Lab HMAC Sign & Verify","description":"146 pay-per-call tools for AI agents, from $0.001 per request in USDC on Base or Solana with x402. No account, no API key.","url":"https://fastx402.tools/hmac-sign?utm_source=zero.xyz","method":"GET","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method"],"properties":{"type":{"type":"string","const":"http"},"method":{"enum":["GET"],"type":"string"},"queryParams":{"type":"object","required":["message","secret"],"properties":{"secret":{"type":"string","description":"The shared secret"},"message":{"type":"string","description":"The signed payload, exactly as received"},"algorithm":{"enum":["sha256","sha512"],"type":"string","description":"sha256 or sha512 (default sha256)"},"signature":{"type":"string","description":"Optional signature to check (hex, base64, or 'sha256=<hex>')"}}}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object","properties":{"hex":{"type":"string"},"base64":{"type":"string"},"matches":{"type":"null"},"algorithm":{"type":"string"}}}}}}},"responseSchema":{"type":"json","example":{"hex":"b85236760a6447cd065efe2b7bd10554c3744eff60cc53dfa47a639c5fd1e22c","base64":"uFI2dgpkR80GXv4re9EFVMN0Tv9gzFPfpHpjnF/R4iw=","matches":null,"algorithm":"sha256"}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.002","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.002/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.002","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.002","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_aoq_s1nvOK58RYpTVLA0u","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.002","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Computes HMAC-SHA256 or HMAC-SHA512 of a message with a secret key, and optionally verifies it against a provided signature","exampleAgentPrompt":"Compute the HMAC-SHA256 of this payload 'v0:1234567890:eyJldmVudCI6Im1lc3NhZ2UifQ==' using the secret 'mysecretkey' and check whether it matches the signature 'sha256=b85236760a6447cd065efe2b7bd10554c3744eff60cc53dfa47a639c5fd1e22c'.","exampleUseCases":[{"title":"Verify incoming Stripe webhook","prompt":"I just got a Stripe webhook and need to verify it's legit — the payload is '{\"type\":\"payment_intent.succeeded\"}', my webhook secret is 'whsec_abc123', and Stripe sent the signature 'sha256=aef34...'. Can you check if it matches using HMAC-SHA256?"},{"title":"Generate HMAC signature for outgoing request","prompt":"I need to sign the message 'order_id=42&amount=99.99&currency=USD' with the shared secret 'topsecret' using HMAC-SHA256 so I can attach it to my outgoing API call — give me the hex digest."},{"title":"Verify GitHub webhook payload","prompt":"GitHub sent a webhook with payload 'refs/heads/main pushed' and the header X-Hub-Signature-256 is 'sha256=deadbeef...'. My webhook secret is 'ghsecret99'. Can you verify with HMAC-SHA256 whether the signature is valid?"}],"resultDescription":"Returns a JSON object containing the HMAC digest in both hex and base64 formats, the algorithm used (sha256 or sha512), and a 'matches' field (true/false/null) indicating whether the optional provided signature matched the computed HMAC.","failureModes":["Missing required 'message' or 'secret' query parameters returns an error","Invalid algorithm value (not sha256 or sha512) may return an error or default to sha256","Malformed signature format may cause 'matches' to return null rather than true/false","Empty message or secret strings may produce unexpected HMAC values"],"whenToPreferThis":"Choose this endpoint when you need a quick, stateless HMAC computation or webhook signature verification without setting up local crypto libraries. Especially useful for verifying Stripe, GitHub, or Shopify webhooks in an agentic pipeline where inputs are not stored and pay-per-call cost is acceptable.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-17T12:40:39.377Z","isFirstParty":false,"canonicalSlug":"fastx402-lab-hmac-sign-verify-9bd8664e"}