| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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.
|
| |
|
|
| |
I previously thought
|
| | |
|
| |
|
|
| |
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.
|
| |
|
|
|
|
| |
decided that to_hash_str will always return native string,
feature of hashes being returned as unicode under python 2
is better done through a CryptContext option.
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
| |
this commit just fixes some error raises
|
| | |
|
| |
|
|
| |
complicates things - kdfs should all use bytes only.
|
| |
|
|
|
|
|
| |
* kdfs, md4, and utils proper
* updated UTs
* added to_native_str helper
* added some UTs for new to_bytes / to_unicode etc methods
|
| |
|
|
|
|
|
| |
* renamed _resolve_prf() to get_prf(), documented interface
* added pbkdf1 support
* added 'encoding' kwd to pbkdf1 & pbkdf2, for easier handling of unicode inputs
*
|
| | |
|
| | |
|
| |
|
|
| |
compat, changes made by 2to3)
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
============================
* now at 99% coverage
* changed some error types
* bugfix to min_verify_time code
* tests for registry, some cryptcontext border cases
* ldap hash tests
* tests for rest of utils
* tests for skeleton hash classes in passlib.utils.drivers
* moved validate_class code from skeleton hash classes to HandlerCase
main things still needing testing:
* category support for CryptContext/Policy
* some bits of registry
|
| |
|
|
|
|
|
|
|
|
|
| |
=============
* restored "default" mode for set_backend()
* bugfix: HandlerCase now sets backend explicitly, incorrect backend checks were previously happening
* added UT for genhash(secret, None)
* enabled HandlerCase.supports_unicode for all hashes
* added some needed test cases revealed by coverage check
* added "pragma: no cover" for a select few branches that don't need testing
* all UTs pass, 92% coverage
|
| | |
|
| | |
|
|
|
=====================
* moved unix style algorithms into passlib.unix package
* renamed unix-crypt to des-crypt
* moved a bunch of utils into new utils pacakge
* NOTE: imports currently broken
|