summaryrefslogtreecommitdiff
path: root/admin
Commit message (Collapse)AuthorAgeFilesLines
* updated tox config, moved GAE helper into tests module to silence tox warningEli Collins2012-04-171-9/+0
|
* CryptPolicy deprecation, part 5 - updated docs, changelog, benchmark scriptEli Collins2012-04-171-83/+174
|
* clarify behavior for secret=None and hash=NoneEli Collins2012-04-111-2/+2
| | | | | | | | | | | | | | | | | | | | | | | * passing a non-string secret or non-string hash to any CryptContext or handler method will now reliably result in a TypeError. previously, passing hash=None to many handler identify() and verify() methods would return False, while others would raise a TypeError. other handler methods would alternately throw ValueError or TypeError when passed a value that wasn't unicode or bytes. the various CryptContext methods also behaved inconsistently, depending on the behavior of the underlying handler. all of these behaviors are gone, they should all raise the same TypeError. * redid many of the from_string() methods to verify the hash type. * moved secret type & size validation to GenericHandler's encrypt/genhash/verify methods. this cheaply made the secret validation global to all hashes, and lets _calc_digest() implementations trust that the secret is valid. * updated the CryptContext and handler unittests to verify the above behavior is adhered to.
* parse_mc3/render_mc3 helpers now handle rounds str<->int, consolidated a ↵Eli Collins2012-04-101-1/+1
| | | | bunch of redundant code
* passlib.exc: added constructors for common errors, should normalize error ↵Eli Collins2012-04-101-1/+1
| | | | messages
* removed default policy file & objectEli Collins2012-04-091-7/+7
| | | | | | | was using default policy to store recommended defaults for hashes, but it only affects CryptContext objects, and users seem to frequent using the handler objects directly - so going to store recommended defaults in the handler from now on.
* added hack to clear warnings registry so assertWarningList() tests will pass ↵Eli Collins2012-03-111-2/+0
| | | | reliably
* renamed calc_checksum() -> _calc_checksum(), hiding the last of the private ↵Eli Collins2012-02-081-1/+1
| | | | methods of most handlers
* renamed passlib.exc warning classesEli Collins2012-02-081-4/+4
|
* large refactor of GenericHandler internalsEli Collins2012-02-081-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* split exceptions/warnings to separate module; added some additional warning ↵Eli Collins2012-01-181-4/+4
| | | | classes to make filtering easier
* import cleanupsEli Collins2012-01-181-1/+1
| | | | | | | | | | | | | | | * moved bytes compat functions from utils to utils.compat (bord, bjoin, bjoin_ints, bjoin_elems, ujoin) * renamed bord -> belem_ord for clarify * a bunch of to_native_str() always use ascii, and have fixed input types (always bytes or always unicode). these don't need overhead of to_native_str(), so replaced those calls with two new funcs: compat.bascii_to_str() / compat.uascii_to_str() * cleaned up a lot of imports from utils/utils.compat to pull from correct module * simplified the to_string() logic of a bunch of handlers to reduce unicode<->byte transitions
* misc fixes for py3 compatEli Collins2011-12-281-9/+19
|
* CryptPolicy rewrite part 2Eli Collins2011-12-271-0/+158
| | | | | | | | | | * refactoring policy kwd parsing & separation with crypt context * internal record objects now part of context instead of policy. * min_verify_time now handled by record objects, now optimized away entirely if not used. * new interface to policy is currently private, will probably delay deprecated / revising public interface until next release. * creating policy & context objects is now 30% faster. * shortened code path when calling context objects now 14% faster.
* added tox config file, may replace custom testing harnessEli Collins2011-10-071-0/+9
|
* added some scripts used during release managementEli Collins2011-09-192-0/+281