{"uid":"cap_y2MrtZ-DHP_iiO1P_flLP","slug":"swift-bot-labs-toolbox-hmac-signature-generator-fa51ca2d","name":"Swift Bot Labs Toolbox – HMAC Signature Generator","description":"62 small, deterministic utility APIs (DNS and e-mail checks, web extraction, EVM decoding, x402 checks, IP math, JSON/CSV, hashing, conversions). No account or API key: pay per call in USDC with x402.","url":"https://x402-toolbox.swiftbotlab.workers.dev/v1/hmac?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"key":{"type":"string","maxLength":4096},"message":{"type":"string","maxLength":1048576},"expected":{"type":"string","maxLength":512,"description":"Optional signature to compare (hex or base64, optional \"sha256=\" prefix)"},"algorithm":{"enum":["sha1","sha256","sha384","sha512","md5"],"type":"string","default":"sha256"},"keyEncoding":{"enum":["utf8","hex","base64"],"type":"string","default":"utf8"}}},"responseSchema":{"type":"json","example":{"ok":true,"tool":"hmac","result":{"hex":"6f0c0b5b...","base64":"bwwLW...","matches":null,"algorithm":"sha256"}}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.003","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.003/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.003","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.003","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_uHnS0zWuCEehvIZ9CmTT-","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.003","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Computes an HMAC signature for a message using a secret key and optionally verifies it against an expected signature, returning hex and base64 encodings.","exampleAgentPrompt":"Compute an HMAC-SHA256 signature for the message 'order_id=12345&amount=99.99' using the secret key 'mysecretkey' and give me both the hex and base64 outputs.","exampleUseCases":[{"title":"Webhook signature verification","prompt":"I just received a webhook from Stripe with a signature header. Can you verify that the HMAC-SHA256 of the raw payload 'amount=500&currency=usd' using my signing secret 'whsec_abc123' matches the expected signature '6f0c0b5bdeadbeef'?"},{"title":"API request signing","prompt":"Sign the string 'GET /api/orders/42 1712345678' with my API secret key 'supersecretkey' using HMAC-SHA512 and give me the hex digest I should attach to the request."},{"title":"Legacy HMAC-SHA1 for OAuth","prompt":"I need an HMAC-SHA1 signature for my OAuth 1.0 request. The base string is 'POST&https%3A%2F%2Fapi.example.com%2Ftweet&...' and the signing key is 'consumerSecret&tokenSecret' — can you compute it and return the base64 value?"}],"resultDescription":"A JSON object with ok:true, the tool name, and a result containing the HMAC as both a hex string and a base64 string, the algorithm used, and a 'matches' boolean (true/false if an expected signature was provided for comparison, null otherwise).","failureModes":["Missing required 'key' or 'message' fields returns a validation error","Invalid algorithm value (not sha1/sha256/sha384/sha512/md5) returns an error","Key or message exceeding max length (4096 / 1MB) may be rejected","Payment failure via x402 protocol returns 402 before processing","Malformed expected signature (invalid hex or base64) may cause comparison to return false rather than error"],"whenToPreferThis":"Choose this endpoint when you need a quick, serverless, no-account HMAC computation or verification without standing up your own crypto infrastructure. Ideal for agents that need to sign payloads or verify webhook authenticity on demand, especially in x402 pay-per-call pipelines where persistent credentials are undesirable. Prefer over rolling your own crypto when auditability of the exact algorithm and encoding is important.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-31T18:40:54.220Z","isFirstParty":false,"canonicalSlug":"swift-bot-labs-toolbox-hmac-signature-generator-fa51ca2d"}