mac/clear mac/final mac/get-keyspec mac/new mac/output-length mac/set-key mac/set-nonce mac/update
(mac/clear mac-obj)
Reset the state of `mac` back to clean, as if no key and input has been supplied. Returns `mac-obj`.
(mac/get-keyspec mac-obj)
Return the key spec of the `mac` in format of [max-key-length min-key-length mod-key-length].
(mac/new name)
Creates a MAC of the given name, e.g., "HMAC(SHA-384)".Returns `mac-obj`.
(mac/set-key mac-obj key)
Set the `key` for the MAC calculation. Returns `mac-obj`.
(mac/set-nonce mac-obj key)
Set the `nonce` for the MAC calculation. Returns `mac-obj`.Note that not all MAC algorithms require a nonce. If a nonce is required, the function has to be called before the data is processed.