diff --git a/django/utils/crypto.py b/django/utils/crypto.py
index 1587bfc..71113bf 100644
a
|
b
|
def salted_hmac(key_salt, value, secret=None):
|
26 | 26 | # line is redundant and could be replaced by key = key_salt + secret, since |
27 | 27 | # the hmac module does the same thing for keys longer than the block size. |
28 | 28 | # However, we need to ensure that we *always* do this. |
29 | | return hmac.new(key, msg=value, digestmod=hashlib.sha1) |
| 29 | return hmac.new(key, msg=b(value), digestmod=hashlib.sha1) |
30 | 30 | |
31 | 31 | def constant_time_compare(val1, val2): |
32 | 32 | """ |