Message191321
Problem:
In hmac.py there's a type check that verifies that the msg parameter is of type bytes().
if not isinstance(msg, bytes):
raise TypeError("expected bytes, but got %r" % type(msg).__name__)
That is incorrect. The hmac module should also work with other data types as long as they are supported by the underlying hashlib module, for example bytearray() and memoryview().
Suggestion:
Remove that type check. hashlib will make sure str() and other invalid data types raises a TypeError. |
|
Date |
User |
Action |
Args |
2013-06-17 10:38:28 | jborgstrom | set | recipients:
+ jborgstrom |
2013-06-17 10:38:28 | jborgstrom | set | messageid: <1371465508.71.0.540084524464.issue18240@psf.upfronthosting.co.za> |
2013-06-17 10:38:28 | jborgstrom | link | issue18240 messages |
2013-06-17 10:38:28 | jborgstrom | create | |
|