MCPcopy
hub / github.com/django/django / encode

Method encode

django/contrib/auth/hashers.py:665–670  ·  view source on GitHub ↗
(self, password, salt)

Source from the content-addressed store, hash-verified

663 algorithm = "md5"
664
665 def encode(self, password, salt):
666 self._check_encode_args(password, salt)
667 password = force_str(password)
668 salt = force_str(salt)
669 hash = hashlib.md5((salt + password).encode()).hexdigest()
670 return "%s$%s$%s" % (self.algorithm, salt, hash)
671
672 def decode(self, encoded):
673 algorithm, salt, hash = encoded.split("$", 2)

Callers 15

verifyMethod · 0.95
make_passwordFunction · 0.45
verifyMethod · 0.45
harden_runtimeMethod · 0.45
groups_for_userFunction · 0.45
get_default_usernameFunction · 0.45
serialize_messagesMethod · 0.45
dumpsMethod · 0.45
compress_kmlFunction · 0.45
__init__Method · 0.45
metadataMethod · 0.45
__init__Method · 0.45

Calls 2

force_strFunction · 0.90
_check_encode_argsMethod · 0.80

Tested by

no test coverage detected