diff options
| author | Florian Apolloner <florian@apolloner.eu> | 2013-11-02 18:18:18 +0100 |
|---|---|---|
| committer | Florian Apolloner <florian@apolloner.eu> | 2013-11-02 18:18:18 +0100 |
| commit | 848a7594748c0124a208425dbf0fd2cc861995c3 (patch) | |
| tree | 8ef017447a2f136b69048d7750e078641e6169b8 /django/utils | |
| parent | b149d1fcd630d307f3d921a9e20055ed98732946 (diff) | |
Fixed #21362 -- Restored Python 2.5 compatibility.
Diffstat (limited to 'django/utils')
| -rw-r--r-- | django/utils/crypto.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/django/utils/crypto.py b/django/utils/crypto.py index e07ef6c1ef..fb3faeb779 100644 --- a/django/utils/crypto.py +++ b/django/utils/crypto.py @@ -134,9 +134,9 @@ def pbkdf2(password, salt, iterations, dklen=0, digest=None): inner, outer = digest(), digest() if len(password) > inner.block_size: password = digest(password).digest() - password += b'\x00' * (inner.block_size - len(password)) - inner.update(password.translate(hmac.trans_36)) - outer.update(password.translate(hmac.trans_5C)) + password += '\x00' * (inner.block_size - len(password)) + inner.update(password.translate(_trans_36)) + outer.update(password.translate(_trans_5c)) def F(i): def U(): |
