MCPcopy
hub / github.com/django/django / must_update

Method must_update

django/contrib/auth/hashers.py:460–468  ·  view source on GitHub ↗
(self, encoded)

Source from the content-addressed store, hash-verified

458 }
459
460 def must_update(self, encoded):
461 decoded = self.decode(encoded)
462 current_params = decoded["params"]
463 new_params = self.params()
464 # Set salt_len to the salt_len of the current parameters because salt
465 # is explicitly passed to argon2.
466 new_params.salt_len = current_params.salt_len
467 update_salt = must_update_salt(decoded["salt"], self.salt_entropy)
468 return (current_params != new_params) or update_salt
469
470 def harden_runtime(self, password, encoded):
471 # The runtime for Argon2 is too complicated to implement a sensible

Callers

nothing calls this directly

Calls 3

decodeMethod · 0.95
paramsMethod · 0.95
must_update_saltFunction · 0.85

Tested by

no test coverage detected