Skip to content

Commit 848a759

Browse files
committed
Fixed #21362 -- Restored Python 2.5 compatibility.
1 parent b149d1f commit 848a759

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

django/utils/crypto.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -134,9 +134,9 @@ def pbkdf2(password, salt, iterations, dklen=0, digest=None):
134134
inner, outer = digest(), digest()
135135
if len(password) > inner.block_size:
136136
password = digest(password).digest()
137-
password += b'\x00' * (inner.block_size - len(password))
138-
inner.update(password.translate(hmac.trans_36))
139-
outer.update(password.translate(hmac.trans_5C))
137+
password += '\x00' * (inner.block_size - len(password))
138+
inner.update(password.translate(_trans_36))
139+
outer.update(password.translate(_trans_5c))
140140

141141
def F(i):
142142
def U():

0 commit comments

Comments
 (0)