Message278235
HMAC digest methods call inner.digest() with no arguments, but new-in-3.6 shake algorithms require a length argument.
possible solutions:
1. add optional length argument to HMAC.[hex]digest, and pass through to inner hash object
2. set hmac.digest_size, and use that to pass through to inner hash object if inner hash object has digest_size == 0
3. give shake hashers a default value for `length` in digest methods (logically 32 for shake_256, 16 for shake_128, I think)
test:
import hmac, hashlib
h = hmac.HMAC(b'secret', digestmod=hashlib.shake_256)
h.hexdigest() # raises on self.inner.digest() requires length argument |
|
Date |
User |
Action |
Args |
2016-10-07 11:50:44 | minrk | set | recipients:
+ minrk |
2016-10-07 11:50:44 | minrk | set | messageid: <1475841044.31.0.0614510494585.issue28384@psf.upfronthosting.co.za> |
2016-10-07 11:50:44 | minrk | link | issue28384 messages |
2016-10-07 11:50:44 | minrk | create | |
|