summaryrefslogtreecommitdiff
path: root/passlib/context.py
Commit message (Collapse)AuthorAgeFilesLines
* lots of work on scram hashEli Collins2012-01-091-7/+15
| | | | | | | | | | | | | | | | | | | | | | | | | 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.
* renamed utils.timer -> utils.tickEli Collins2012-01-051-3/+3
|
* context tweaks:Eli Collins2012-01-021-8/+13
| | | | | | * _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.
* CryptContext can now run passwords through SASLPrep via "passprep" options ↵Eli Collins2012-01-021-2/+60
| | | | [issue 24]
* mvt code now uses time.clock() under win32Eli Collins2011-12-281-12/+5
|
* removed Undef singleton, private _NOTSET singletons are cleaner.Eli Collins2011-12-281-1/+1
|
* misc fixes for py3 compatEli Collins2011-12-281-8/+9
|
* updated some commentsEli Collins2011-12-281-12/+9
|
* Merge from defaultEli Collins2011-12-281-502/+869
|\
| * CryptPolicy rewrite part 2Eli Collins2011-12-271-585/+658
| | | | | | | | | | | | | | | | | | | | * 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.
| * typoEli Collins2011-12-221-1/+1
| |
| * large rewrite of how CryptPolicy is parsed and compiled; should result in ↵Eli Collins2011-12-221-324/+611
| | | | | | | | *much* shorter codepath when calling CryptContext.encrypt(), etc
* | couple of minor tweaks - basic unittests pass 2.7 & 3.2Eli Collins2011-12-061-3/+3
| |
* | added compat.unicode imports in a number of placesEli Collins2011-12-061-2/+2
| | | | | | | | | | | | | | | | 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
* | added compat.aliased lazy-loading module, aliases for BytesIO/StringIOEli Collins2011-12-061-34/+29
| |
* | moved sys_bits to compat, added exc_err, removed utils.py32_langEli Collins2011-12-061-3/+3
| |
* | replaced (int,long) instance checks with compat.int_typesEli Collins2011-12-061-2/+2
| |
* | added compatibility module (passlib.utils.compat)Eli Collins2011-12-061-12/+8
|/ | | | | | | | | 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()
* Merge 1.5.3 bugfixesEli Collins2011-10-081-60/+6
|\
| * Merge fixes from release-1.5Eli Collins2011-09-191-60/+6
| |\
| | * beginning 1.6 devEli Collins2011-08-251-60/+6
| | | | | | | | | | | | | | | * removed previously deprecated support for ConfigParser interpolated files * removed previously deprecated support for set_backend(None)
* | | minor documentation updatesEli Collins2011-10-071-1/+1
| | |
* | | bcrypt padding work:Eli Collins2011-10-071-0/+5
|/ / | | | | | | | | | | | | | | * 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 small bug in CryptPolicy.iter_config() related to deprecation optionsEli Collins2011-09-141-4/+8
| |
* | added documentation for verify_and_updateEli Collins2011-09-141-1/+48
|/
* provide fallbackEli Collins2011-08-121-3/+30
|
* bugfix to CryptContext.verify [issue 17]Eli Collins2011-08-101-1/+2
| | | | | | | * 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
* ConfigParser deprecation tweaksEli Collins2011-07-111-5/+15
| | | | | | * 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
* tried to clarify variable names w/in policy parsing codeEli Collins2011-07-101-23/+45
|
* misc documentation tweaksEli Collins2011-06-301-12/+12
|
* basic work to make CryptContext unicode aware.Eli Collins2011-06-161-34/+91
| | | | | | * 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
* bugfix: changed CryptPolicy to use SafeConfigParser (as it really should ↵Eli Collins2011-06-041-5/+59
| | | | | | | | 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.
* large rework of documentation; mainly to give more room to LDAP hashes, and ↵Eli Collins2011-04-291-1/+10
| | | | document ldap CRYPT hashes
* added LazyCryptContext - delays parsing policy & loading handlers until ↵Eli Collins2011-04-081-1/+65
| | | | actually used
* bugfix: typo in border case of min_verify_timeEli Collins2011-03-301-1/+1
|
* more error statements rewrittenEli Collins2011-03-281-1/+1
|
* replaced "raise exc, msg" with "raise exc(msg)" everywhere (working on py3k ↵Eli Collins2011-03-281-15/+15
| | | | compat, changes made by 2to3)
* CryptContext: add verify_and_update() convenience method (UTs added)Eli Collins2011-03-271-9/+8
|
* CryptContext: schemes list no longer required by constructor - allows app to ↵Eli Collins2011-03-271-2/+0
| | | | load policy at later time (UTs altered)
* bugfix: properly handle CryptContext border case where ↵Eli Collins2011-03-271-1/+8
| | | | default_rounds>max_rounds w/ vary_rounds enabled, previously threw error (UT added)
* reworked how vary_rounds works to properly account for log2 rounds parametersEli Collins2011-03-241-6/+14
|
* added phpass_context & phpbb3_context to passlib.appsEli Collins2011-03-241-5/+3
|
* documentation updatesEli Collins2011-03-241-15/+46
| | | | | | | | | | | | ===================== * CryptContext docs finished * README / LICENSE updated * license text changed to correct BSD wording * embarassingly, the history.rst is kinda off about release versions. tried to make it give readers better outline. * misc doc updates * some handler names (eg: 'context', 'all') now forbidden by register_crypt_handler() * bumped setup.cfg to b1
* lots of work documenting CryptContext classEli Collins2011-03-231-73/+164
|
* various CryptContext improvementsEli Collins2011-03-231-1/+20
| | | | | | | ================================= * tweaked vary_rounds code to not "bunch up" when it hits min/max rounds * updated default policy settings * issues warning if min verify time is exceeded
* split passlib.base into passlib.registry & passlib.context - the two have ↵Eli Collins2011-03-221-0/+801
| | | | little to do with eachother
* rearranged some modulesEli Collins2011-01-301-451/+0
|
* working on policy for CryptContext, names must now use underscores instead ↵Eli Collins2011-01-301-42/+282
| | | | of hyphens
* bugfixin'Eli Collins2011-01-191-11/+4
| | | | | | | | | ========= * bumped to 1.3 * refactored UTs a little bit * updated UTs to match new layout & protocols * lots of bug fixes * all UTs pass
* import cleanupsEli Collins2011-01-191-1/+1
|