Changes between Version 8 and Version 9 of Ticket #34661, comment 8


Ignore:
Timestamp:
Jun 18, 2023, 6:31:08 PM (18 months ago)
Author:
Fatih Erikli

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #34661, comment 8

    v8 v9  
    77    def encode(self, password, salt, iterations=None):
    88        iterations = iterations or self.iterations
    9         hash = pbkdf2(password, salt, iterations, digest=self.digest)
    10         hash = base64.b64encode(
    11             hash+settings.PASSWORD_PEPPER).decode('ascii').strip()
     9        hash = pbkdf2(password, salt + settings.PASSWORD_PEPPER, iterations, digest=self.digest)
     10        hash = base64.b64encode(hash).decode('ascii').strip()
    1211        return "%s$%d$%s$%s" % (self.algorithm, iterations, salt, hash)
    1312}}}
Back to Top