summaryrefslogtreecommitdiff
path: root/passlib/handlers/phpass.py
diff options
context:
space:
mode:
authorEli Collins <elic@assurancetechnologies.com>2012-02-08 22:38:25 -0500
committerEli Collins <elic@assurancetechnologies.com>2012-02-08 22:38:25 -0500
commit86a2dc3ed68fcdf7853f5e219541a19b5fcacfff (patch)
tree8319e8704f04a23faab1eedfad383d50ff6d3671 /passlib/handlers/phpass.py
parent4c4615329b64287dabd729e3078ab03cb2bb7442 (diff)
downloadpasslib-86a2dc3ed68fcdf7853f5e219541a19b5fcacfff.tar.gz
large refactor of GenericHandler internals
strict keyword -------------- * GenericHandler's "strict" keyword had poorly defined semantics; replaced this with "use_defaults" and "relaxed" keywords. Most handlers' from_string() method specified strict=True. This is now the default behavior, use_defaults=True is enabled only for encrypt() and genconfig(). relaxed=True is enabled only for specific handlers (and unittests) whose code requires it. This *does* break backward compat with passlib 1.5 handlers, but this is mostly and internal class. * missing required settings now throws a TypeError instead of a ValueError, to be more in line with std python behavior. * The norm_xxx functions provided by the GenericHandler mixins (e.g. norm_salt) have been renamed to _norm_xxx() to reflect their private nature; and converted from class methods to instance methods, to simplify their call signature for subclassing. misc ---- * rewrote GenericHandler unittests to use constructor only, instead of poking into norm_salt/norm_rounds internals. * checksum/salt charset checks speed up using set comparison * some small cleanups to FHSP implementation
Diffstat (limited to 'passlib/handlers/phpass.py')
-rw-r--r--passlib/handlers/phpass.py2
1 files changed, 0 insertions, 2 deletions
diff --git a/passlib/handlers/phpass.py b/passlib/handlers/phpass.py
index bd72ef8..19486a9 100644
--- a/passlib/handlers/phpass.py
+++ b/passlib/handlers/phpass.py
@@ -68,7 +68,6 @@ class phpass(uh.HasManyIdents, uh.HasRounds, uh.HasSalt, uh.GenericHandler):
min_rounds = 7
max_rounds = 30
rounds_cost = "log2"
- _strict_rounds_bounds = True
#--HasManyIdents--
default_ident = u("$P$")
@@ -103,7 +102,6 @@ class phpass(uh.HasManyIdents, uh.HasRounds, uh.HasSalt, uh.GenericHandler):
rounds=h64.decode_int6(rounds.encode("ascii")),
salt=salt,
checksum=chk or None,
- strict=bool(chk),
)
def to_string(self):