Calculate HMAC-SHA1 or HMAC-SHA256 from a shared text key and message, producing 40 or 64 lowercase hexadecimal characters. Matching algorithm and input bytes let two protocol endpoints compare message authentication values.
The key and message are UTF-8 text; hex and Base64 are not decoded automatically. Key length is limited to 50,000 and message length to 100,000. Empty values are supported for tests. HMAC-SHA256 is the default.