[issue21306] PEP 466: backport hmac.compare_digest

Donald Stufft report at bugs.python.org
Tue Apr 22 23:30:06 CEST 2014


Donald Stufft added the comment:

try:
    data = data.encode("ascii")
except UnicodeEncodeError:
    raise TypeError("comparing unicode with non-ASCII characters is not supported")

?

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue21306>
_______________________________________


More information about the Python-bugs-list mailing list