mirror of
https://github.com/Hopiu/django.git
synced 2026-05-02 04:34:45 +00:00
[py3] Decoded base64-encoded hash in contrib.auth.hashers
This commit is contained in:
parent
cb38fd9632
commit
87e0a75c03
1 changed files with 1 additions and 1 deletions
|
|
@ -219,7 +219,7 @@ class PBKDF2PasswordHasher(BasePasswordHasher):
|
|||
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):
|
||||
|
|
|
|||
Loading…
Reference in a new issue