Returns the HMAC of a value under a key.
sha256, sha384 or sha512
sha256
sha384
sha512
the key: bytes, a string, or a secret KeyObject
the bytes, or a string read as UTF-8
hex, base64 or base64url; a Buffer when absent
hex
base64
base64url
the MAC
Error for an algorithm outside the list
Returns the HMAC of a value under a key.