| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
| |
directly
|
| |
|
|
| |
tweaked a little
|
| |
|
|
|
|
|
|
|
|
| |
* this should simplify the api for users, CryptPolicy encapsulated an implementation detail
they didn't need to deal with.
* config file parsing is a lot stricter, easier for apps to add custom hacks
* CryptContext instances can now be reconfigured much easier.
* loads should be faster.
(breaking changes into multiple commits)
|
| | |
|
| |
|
|
|
|
|
| |
* test os_crypt backend has functional fallback
* test handler methods accept all unicode/bytes combinations for secret & hash
* fixed some incorrect error messages & types being caught & raised
* other minor cleanups
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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.
|
| |
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
passlib.tests
-------------
* deprecated support for unittest 1... accumulated too many backports,
planning to require unittest2 in next release.
* case_prefix renamed to shortDescription
* test case now archives & clears warning registry state in addition
to warning filter state
passlib.utils.compat
--------------------
* a bunch of the bytes-related functions were renamed for clarity
* NativeStringIO alias added
* trange alias merged into irange
|
| | |
|
| |\ |
|
| | | |
|
| |/
|
|
| |
and adds code complexity
|
| |
|
|
| |
classes to make filtering easier
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
handler
-------
* added 'scram' to default registry list
* handler 'algs' keyword now parsed & validated correctly
* digest names normalized -> IANA spec
* saslprep() integrated into code
* added config string format
related
-------
* added documentation (still needs cleaning up though)
* added majority of UTs, still need to add a few edge cases
other
-----
* redid context->handler deprecation link - code now looks for
handler._deprecated_detector(settings) to generate a callable,
should be more efficient, and allow errors to be throw at bind-time
instead of call-time.
* pbkdf2() function now treats keylen = -1 as request for
keylen = PRF digest size.
|
| | |
|
| |
|
|
|
|
| |
* _generate_rounds disables if 'rounds' specified in policy settings for hash.
* KeyError will now be thrown if policy specifies setting not supported by handler.
* set stacklevel for rounds bound warning so it matches where encrypt() was called.
|
| |
|
|
| |
[issue 24]
|
| | |
|
| | |
|
| | |
|
| | |
|
| |\ |
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* 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.
|
| | | |
|
| | |
| |
| |
| | |
*much* shorter codepath when calling CryptContext.encrypt(), etc
|
| | | |
|
| | |
| |
| |
| |
| |
| |
| |
| | |
this distinguishes the types, so that for isinstance() tests...
* 'unicode' always means the unicode type
* 'bytes' always means the bytes type
* 'str' always means the native string type
|
| | | |
|
| | | |
|
| | | |
|
| |/
|
|
|
|
|
|
|
| |
exports specialized range & map aliases, and some dict helpers
* all dict.iteritems() calls replaced with compat.iteritems(dict)
* all xrange() calls replaced with compat.irange()
* all range() calls replaced with compat.trange() and compat.lrange() as appropriate
* all map() calls replaced with compat.lmap()
|
| |\ |
|
| | |\ |
|
| | | |
| | |
| | |
| | |
| | | |
* removed previously deprecated support for ConfigParser interpolated files
* removed previously deprecated support for set_backend(None)
|
| | | | |
|
| |/ /
| |
| |
| |
| |
| |
| |
| | |
* added changelog entry re: issue & fix
* bcrypt now warns about padding bits in digest as well
* bcrypt.normhash() now normalizes salt padding bits, digest padding bits, and rounds zero-padding
* hash_needs_update() will now flag unclean bcrypt hashes as needing an update
* UTs for hash_needs_update(), and digest padding bit handling
|
| | | |
|
| |/ |
|
| | |
|
| |
|
|
|
|
|
| |
* fixed formatting error thrown by CryptContext.verify when issuing min_verify_time warning
* rewrote CryptContext.verify's min_verify_time UT to:
- use mock hash handler
- verify that appropriate warning is issued when going overtime
|
| |
|
|
|
|
| |
* Py3.2 renamed SafeConfigParser -> ConfigParser, we now import that to silence deprecation warnings
* Py3.2 deprecated parser.readfp() in favor of read_file()
* added py3k_lang, py32_lang constants to simplify future checks
|
| | |
|
| | |
|
| |
|
|
|
|
| |
* updated CryptContext UTs as well.
* also added some general unicode<->bytes helpers to utils (needs UTs).
* also a few 2to3 conditional hints added to CryptContext so passlib can load
|
| |
|
|
|
|
|
|
| |
have all along)
* this may break parsing of some files which have "vary_rounds = 10%", that should now read "vary_rounds = 10%%".
* currently detecting that case, and falling back to old behavior + userwarning
* passlib 1.6 will let this be fatal.
|
| |
|
|
| |
document ldap CRYPT hashes
|
| |
|
|
| |
actually used
|
| | |
|