hmac.HMAC.hexdigest()

HMAC.hexdigest()

Like digest() except the digest is returned as a string twice the length containing only hexadecimal digits. This may be used to exchange the value safely in email or other non-binary environments.

Warning

When comparing the output of hexdigest() to an externally-supplied digest during a verification routine, it is recommended to use the compare_digest() function instead of the == operator to reduce the vulnerability to timing attacks.

doc_python
2016-10-07 17:33:44
Comments
Leave a Comment

Please login to continue.