generate_hmac
Compute an HMAC signature for a message using a secret key. Supports SHA-256 (default), SHA-512, SHA-1, and MD5. Used for API request signing, webhook verification (GitHub, Stripe, Twilio), and JWT validation.
Example tool call
This call uses example arguments supplied in the tool’s input schema.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"secret": "k",
"message": "msg",
"algorithm": "sha256"
},
"name": "generate_hmac"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| secret | Yes | Secret key | |
| message | Yes | Message to sign | |
| encoding | No | Output encoding (default: hex) | |
| algorithm | No | Hash algorithm: sha256 (default), sha512, sha1, md5 |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| hmac | No | ||
| encoding | No | ||
| algorithm | No | ||
| message_length | No |