{"id":"hmac-compute","version":"1.0.0","description":"Compute HMAC-SHA256/SHA512/MD5/SHA-1/SHA-3/RIPEMD-160 (RFC 2104) over encoded key and message bytes.","supported_operations":["compute hmac sha256 signature","sign this payload with hmac","hmac of a raw request body with a shared secret","hmac-sha512 of a message with a key","compute a message authentication code","חשב חתימת hmac"],"unsupported_operations":["verifying a caller-supplied signature (see hmac-verify)","HMAC with the XOF algorithms shake128/shake256/blake3 (no fixed output length to use as a MAC)"],"semantics":["algorithm selects the underlying hash function for HMAC (RFC 2104); mac_bytes always equals that hash function's native output length: md5=16, sha1=20, ripemd160=20, sha224=28, sha256=32, sha384=48, sha512=64, sha512-224=28, sha512-256=32, sha3-224=28, sha3-256=32, sha3-384=48, sha3-512=64.","An empty key is valid (RFC 2104 places no minimum length on the key) and produces a normal HMAC, not an error.","key is never echoed anywhere in the output or in any error's details.","hex is lowercase; base64 is RFC 4648 section 4 padded; base64url is RFC 4648 section 5 unpadded.","key_encoding and message_encoding default to utf8 when omitted; a lone UTF-16 surrogate under utf8 is invalid_input."],"limits":{"max_key_bytes":4096,"max_message_bytes":65536},"pricing":{"status":"unpriced","charge_usd":null},"input_schema":{"type":"object","additionalProperties":false,"required":["key","message","algorithm"],"properties":{"key":{"type":"string","maxLength":16384},"key_encoding":{"type":"string","enum":["utf8","hex","base64","base64url"],"default":"utf8"},"message":{"type":"string","maxLength":262144},"message_encoding":{"type":"string","enum":["utf8","hex","base64","base64url"],"default":"utf8"},"algorithm":{"type":"string","enum":["md5","sha1","ripemd160","sha224","sha256","sha384","sha512","sha512-224","sha512-256","sha3-224","sha3-256","sha3-384","sha3-512"]}}},"output_schema":{"type":"object","additionalProperties":false,"required":["algorithm","hex","base64","base64url","mac_bytes"],"properties":{"algorithm":{"type":"string","enum":["md5","sha1","ripemd160","sha224","sha256","sha384","sha512","sha512-224","sha512-256","sha3-224","sha3-256","sha3-384","sha3-512"]},"hex":{"type":"string","pattern":"^[0-9a-f]+$","minLength":2},"base64":{"type":"string","pattern":"^[A-Za-z0-9+/]+=*$","minLength":1},"base64url":{"type":"string","pattern":"^[A-Za-z0-9_-]+$","minLength":1},"mac_bytes":{"type":"integer","minimum":16}}},"examples":[{"input":{"key":"0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b","key_encoding":"hex","message":"Hi There","algorithm":"sha256"},"output":{"algorithm":"sha256","hex":"b0344c61d8db38535ca8afceaf0bf12b881dc200c9833da726e9376c2e32cff7","base64":"sDRMYdjbOFNcqK/OrwvxK4gdwgDJgz2nJuk3bC4yz/c=","base64url":"sDRMYdjbOFNcqK_OrwvxK4gdwgDJgz2nJuk3bC4yz_c","mac_bytes":32}},{"input":{"key":"","message":"","algorithm":"sha256"},"output":{"algorithm":"sha256","hex":"b613679a0814d9ec772f95d778c35fc5ff1697c493715653c6c712144292c5ad","base64":"thNnmggU2ex3L5XXeMNfxf8Wl8STcVZTxscSFEKSxa0=","base64url":"thNnmggU2ex3L5XXeMNfxf8Wl8STcVZTxscSFEKSxa0","mac_bytes":32}}],"execute_url":"/v1/tools/hmac-compute/versions/1.0.0/execute"}