MCPcopy
hub / github.com/django/django / decode

Method decode

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

Source from the content-addressed store, hash-verified

606 return "%s$%d$%s$%d$%d$%s" % (self.algorithm, n, force_str(salt), r, p, hash_)
607
608 def decode(self, encoded):
609 algorithm, work_factor, salt, block_size, parallelism, hash_ = encoded.split(
610 "$", 6
611 )
612 assert algorithm == self.algorithm
613 return {
614 "algorithm": algorithm,
615 "work_factor": int(work_factor),
616 "salt": salt,
617 "block_size": int(block_size),
618 "parallelism": int(parallelism),
619 "hash": hash_,
620 }
621
622 def verify(self, password, encoded):
623 decoded = self.decode(encoded)

Callers 3

verifyMethod · 0.95
safe_summaryMethod · 0.95
must_updateMethod · 0.95

Calls 1

splitMethod · 0.45

Tested by

no test coverage detected