Pylons/pyramid — pull request #1177 by bertjwregeer (2013-10-27 03:27:29+00:00)
Title: digestmod() has to accept a parameter in certain cases

Due to line 69 in hmac.py in the Python standard library (2.7) it
expects to be able to call the digestmod function with the current key
if the key passed in exceeds the block size in length.

This fixes the code so that digestmod can accept string as an extra
parameter, which is passed through to hashlib.new()

---

Test added as well, so that we can catch regressions if they happen in
the future.

[1]: http://hg.python.org/cpython/file/2.7/Lib/hmac.py#l69