hashers: allow password digest without salt in the generic hashlib hasher

This commit is contained in:
Benjamin Dauvergne 2013-05-21 20:10:43 +02:00
parent e21574a739
commit 9bb9dcb215
1 changed files with 1 additions and 1 deletions

View File

@ -92,7 +92,7 @@ class CommonPasswordHasher(hashers.BasePasswordHasher):
def encode(self, password, salt):
assert password
assert salt and '$' not in salt
assert '$' not in salt
hash = self.digest(force_bytes(salt + password)).hexdigest()
return "%s$%s$%s" % (self.algorithm, salt, hash)