hmac.hexdigest()
hmac.hexdigest() is a Python method in the Hmac Module category. Returns the digest as a hexadecimal string. The syntax is hmac.hexdigest(). Returns: Hex string. A typical example: h.hexdigest() # "8e...". A close sibling is hmac.new(), which creates a new HMAC object for message authentication. A close sibling is hmac.digest(), which returns the digest as bytes. A close sibling is hmac.update(), which updates the HMAC object with additional data. A close sibling is hmac.compare_digest(), which constant-time comparison to prevent timing attacks. More about this category: HMAC message authentication — new, digest, hexdigest, compare_digest. Related Hmac Module entries: hmac.new(), hmac.digest(), hmac.update(), hmac.compare_digest(). This page is part of the free Python Reference documentation covering 978+ functions, methods, and modules with examples and parameter details. You can try hmac.hexdigest() immediately in the Python playground, look up unfamiliar terms in the glossary, or return to the Python Reference homepage.