A hash object has the following attributes:
.. attribute:: HMAC.digest_size
The size of the resulting HMAC digest in bytes.
.. attribute:: HMAC.block_size
The internal block size of the hash algorithm in bytes.
.. versionadded:: 3.4
.. attribute:: HMAC.name
The canonical name of this HMAC, always lowercase, e.g. ``hmac-md5``.
.. versionadded:: 3.4
This module also provides the following helper function:
.. function:: compare_digest(a, b)
Return ``a == b``. This function uses an approach designed to prevent
timing analysis by avoiding content-based short circuiting behaviour,
making it appropriate for cryptography. *a* and *b* must both be of the
same type: either :class:`str` (ASCII only, as e.g. returned by
:meth:`HMAC.hexdigest`), or a :term:`bytes-like object`.
.. note::
If *a* and *b* are of different lengths, or if an error occurs,
a timing attack could theoretically reveal information about the
types and lengths of *a* and *b*—but not their values.
.. versionadded:: 3.3
.. seealso::
Module :mod:`hashlib`
The Python module providing secure hash functions.