Calculate the MAC for checking the key. See https://spec.matrix.org/v1.11/client-server-api/#msecret_storagev1aes-hmac-sha2, steps 3 and 4.
the key to use
Optional
The initialization vector as a base64-encoded string. If omitted, a random initialization vector will be created.
An object that contains, mac and iv properties.
mac
iv
Calculate the MAC for checking the key. See https://spec.matrix.org/v1.11/client-server-api/#msecret_storagev1aes-hmac-sha2, steps 3 and 4.