{"uid":"cap_pdPiJ8BSOrDLFPP78eZK-","slug":"hash-hmac-45e70908","name":"hash-hmac","description":"Compute an HMAC (MD5, SHA-1, SHA-256 or SHA-512) of text with a given key.","url":"https://x402.agentindex.world/hash/hmac?utm_source=zero.xyz","method":"GET","headers":{},"bodySchema":{"type":"object","properties":{"key":{"type":"string","title":"Key"},"text":{"type":"string","title":"Text"},"algorithm":{"type":"string","title":"Algorithm","default":"sha256","pattern":"^(md5|sha1|sha256|sha512)$"}}},"responseSchema":{"type":"json","example":{"hex_digest":"8b5f48702995c1598c573db1e21866a9b825d4a794d169d7060a03605796360b"}},"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_aC1L0bhHyoUTG42BuuqZ2","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":"Compute an HMAC (MD5, SHA-1, SHA-256, or SHA-512) of a text string using a secret key","exampleAgentPrompt":"Compute an HMAC-SHA256 of the text 'order-id:12345;amount:99.99' using the secret key 'mysecretkey123'.","exampleUseCases":[{"title":"Webhook signature verification","prompt":"Generate an HMAC-SHA256 signature for the payload 'user_id=42&event=purchase&timestamp=1716300000' using the secret key 'wh_secret_abc987' so I can compare it against the X-Signature header from the incoming webhook."},{"title":"OAuth 1.0 request signing","prompt":"I need an HMAC-SHA1 of the base string 'GET&https%3A%2F%2Fapi.example.com%2Fdata&oauth_nonce%3Dabc' using the signing key 'consumer_secret&token_secret' for an OAuth 1.0 API call."},{"title":"API payload integrity check","prompt":"Compute an HMAC-MD5 of the string 'TransactionID=TXN001&Amount=500' using the key 'sharedSecretKey' so I can append it as a checksum to my payment request."}],"resultDescription":"Returns the HMAC digest of the input text computed with the specified algorithm (MD5, SHA-1, SHA-256, or SHA-512) and the provided secret key, typically as a hex-encoded string.","failureModes":["Missing required 'key' or 'text' parameter returns an error","Invalid algorithm value not matching md5|sha1|sha256|sha512 pattern returns validation error","Empty key or text may produce unexpected or rejected results","Network timeout or payment failure (x402) prevents call completion"],"whenToPreferThis":"Use this endpoint when you need a quick, stateless HMAC computation without setting up a local crypto library — ideal for serverless agents, quick webhook signature generation, or environments where cryptographic primitives aren't readily available. Supports four common algorithms in a single API call.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-12T18:38:39.620Z","isFirstParty":false,"canonicalSlug":"hash-hmac-45e70908"}