summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClaude Paroz <claude@2xlibre.net>2012-07-22 18:05:53 +0200
committerClaude Paroz <claude@2xlibre.net>2012-07-22 18:05:53 +0200
commit690cabe2033b43999f576cbe581b8f465903eda0 (patch)
treeeb34a5a5fa0844d00b3a3ac59ad1ab6129303a29
parent00ace01411b4cb558e71bfaf34cf42870e73092b (diff)
Used a Python 3-compatible syntax for building a translation table
-rw-r--r--django/utils/crypto.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/django/utils/crypto.py b/django/utils/crypto.py
index 67b628625e..9d46bdd793 100644
--- a/django/utils/crypto.py
+++ b/django/utils/crypto.py
@@ -27,8 +27,8 @@ from django.utils.encoding import smart_str
from django.utils.six.moves import xrange
-_trans_5c = b"".join([chr(x ^ 0x5C) for x in xrange(256)])
-_trans_36 = b"".join([chr(x ^ 0x36) for x in xrange(256)])
+_trans_5c = bytearray([(x ^ 0x5C) for x in xrange(256)])
+_trans_36 = bytearray([(x ^ 0x36) for x in xrange(256)])
def salted_hmac(key_salt, value, secret=None):