Browse files

[py3] Decoded base64-encoded hash in contrib.auth.hashers

  • Loading branch information...
1 parent cb38fd9 commit 87e0a75c03747c5b7ed87311c2e1f34d9fb20bee @andrewsmedina andrewsmedina committed with claudep Aug 11, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 django/contrib/auth/hashers.py
View
2 django/contrib/auth/hashers.py
@@ -219,7 +219,7 @@ def encode(self, password, salt, iterations=None):
if not iterations:
iterations = self.iterations
hash = pbkdf2(password, salt, iterations, digest=self.digest)
- hash = base64.b64encode(hash).strip()
+ hash = base64.b64encode(hash).decode('ascii').strip()
return "%s$%d$%s$%s" % (self.algorithm, iterations, salt, hash)
def verify(self, password, encoded):

0 comments on commit 87e0a75

Please sign in to comment.