summaryrefslogtreecommitdiff
path: root/passlib/base.py
Commit message (Collapse)AuthorAgeFilesLines
* split passlib.base into passlib.registry & passlib.context - the two have ↵Eli Collins2011-03-221-1050/+0
| | | | little to do with eachother
* documentation work & rearrangingEli Collins2011-03-221-4/+5
| | | | | | | | | | ================================ * added documentation for overview, ldap digests * lots of other documentation updates * renamed passlib.unix -> passlib.hosts * renamed passlib.sqldb -> passlib.servers * added passlib.servers.custom_app_context for quickstart purposes * added ldap {CLEARTEXT} support
* cleaned up registry code, added more UTs.Eli Collins2011-03-211-72/+122
|
* bugfixes, tweaks, test casesEli Collins2011-03-181-30/+28
| | | | | | | | | | | | | | | | | ============================ * 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
* removed postres_plaintext, redundantEli Collins2011-03-181-1/+0
|
* added Oracle 10 & 11 password hashes, with docs & UTsEli Collins2011-03-181-0/+2
|
* apache & misc workEli Collins2011-03-151-0/+3
| | | | | | | | ================== * added prelim helpers for htpasswd & htdigest * bugfix to ldap hashes * added CryptContext.replace() back * NOTE: all above need UTs and docs
* added ldap's {MD5} {SHA} {SMD5} {SSHA} formats (still needs docs & UTs)Eli Collins2011-03-151-0/+4
|
* supporting hashes addedEli Collins2011-03-141-0/+7
| | | | | | | | ======================= * added unix_fallback scheme, for detecting wildcard/disabled passwords in /etc/shadow files * added plaintext scheme, for migrating existing application * added hex md4/md5/sha1/sha256/sha512 schemes, for migrating existing applications * docs & UTs added for above schemes
* fixed wart - CryptContext now searches schemes in order, instead of reverse ↵Eli Collins2011-03-051-3/+3
| | | | order (and default is now first option)
* CryptPolicy.get_options() now caches resultsEli Collins2011-03-041-4/+20
|
* UT workEli Collins2011-03-041-4/+4
| | | | | | | | | | | | ======= * commented out test_frontend entirely, until frontend added back * CryptContext._prepare_settings now a private method * added CryptContext UT for forbidden options * added CryptContext UT for _prepare_settings as exposed through genconfig() this should test all the main _prepare_settings behaviors * added basic test for _prepare_settings() as exposed through encrypt() as well * sample hashes for test_utils_drivers *
* cryptcontext workEli Collins2011-03-031-59/+54
| | | | | | | | | | | | | ================= * hash_needs_update() method - renamed method from hash_is_compliant() - cleaned up code - added UT for method * prepare_settings() methods - renamed method from norm_handler_settings() - cleaned up code - TODO: write UT * renamed "vary_default_rounds" to "vary_rounds", was too verbose
* factored out policy item parsingEli Collins2011-03-021-34/+38
|
* policy/context workEli Collins2011-02-281-102/+119
| | | | | | | | | | | | | =================== * tweaks to policy kwds/format: - renamed "default" hash category to "all" - renamed "fallback" kwd to "default" * added salt_charset to password hash api * removed some legacy formats from policy parser * minor renames to a lot of policy parser methods * UTs for CryptPolicy & CryptContext added - all tests currently pass - CryptContext tests not *quite* done
* bugfixes to Crypt PolicyEli Collins2011-02-281-4/+7
|
* minor changes to CryptContext / CryptPolicyEli Collins2011-02-251-25/+43
|
* misc CryptPolicy workEli Collins2011-02-171-86/+110
| | | | | | | | | ===================== * simplified from_sources() code to use iteritems() * renamed as_dict / as_string / as_file -> to_dict() / to_string() / to_path(), for consistency * CryptContext default rounds now accounts for log2 rounds func * CryptPolicy.replace() allows clone+mutate of existing policies (ala datetime.replace) * removed CryptPolicy.iteritems() 'minimal' kwd - needless complication
* added bigcrypt & crypt16 as described in perl Authen-Passphrase documentationEli Collins2011-02-161-0/+2
|
* large rearrangment of structureEli Collins2011-02-161-50/+114
| | | | | | | | | | | | | | | | | | | | =============================== * moved passlib.hash package to passlib.drivers * combined some passlib.driver modules together (eg ext_des_crypt merged w/ des_crypt) * renamed all hash classes to lower case, to match name attrs. * renamed ext_des_crypt to bsdi_crypt * added special proxy module "passlib.hash" which lazily loads drivers from correct location - registry system reworked, has list of locations for builtin drivers, and capability for apps to add more - passlib.hash *is* the registry, changes to it affect list - thanks to this, documentation can remain, pointing to passlib.hash.xxx as location for driver * moved passlib.utils.handlers to passlib.utils.drivers, renamed classes from XxxHandler -> XxxHash * combined all driver tests into single passlib/tests/test_drivers.py file * NOTE: disabled default unicode testing, not ready for that yet * all driver UTs pass (others not checked)
* moved passlib.hash to passlib.driversEli Collins2011-02-161-0/+15
|
* cleanupsEli Collins2011-02-141-1/+1
| | | | | | | | | | | | | ======== * removed from utils since they're not used: norm_salt, norm_rounds, gen_salt * commented out from utils since they're not used: abstractmethod, abstractclassmethod, memoized_class_property * removed passlib.hash.__skel - no longer used * rearranged utils.handlers: - all handler helper classes now inherit from eachother - BaseHandler (renamed from WrappedHandler) - ExtHandler (inherits from BaseHandler, was previously the one named BaseHandler) - StaticHandler (inherits from ExtHandler, renamed from PlainHandler) * converted test_handler classes to use ExtHandler & StaticHandler
* trying out sha512_crypt class-based handlerEli Collins2011-02-111-0/+5
| | | | | | | | * added passlib.utils.handlers.BaseSRHandler - class providing framework for hashes w/ salt & rounds * converted sha512_crypt to use it (registers class when module imported) * tweaked autodocument to work w/ classes - FIXME: won't work right with common methods in parent class * tweaked handler registration to check if module registered class after import
* misc fixesEli Collins2011-02-071-6/+18
| | | | | | | ========== * CryptContext.is_compliant() now checks rounds parameter * some typo fixes * removed docs from CryptHandler - text is now in docs/password_hash_api.rst
* CryptPolicy workEli Collins2011-02-071-64/+141
| | | | | | | ================ * finished CryptPolicy.from_sources() - uncommented default_policy now that this works * serialization: added CryptPolicy.iteritems() / as_dict() / as_string() / write_to_file()
* sql workEli Collins2011-02-071-0/+2
| | | | | | | | ======== * combined passlib.mysql, passlib.postgres -> passlib.sqldb (contents were too small to be worth multiple modules) * added helper to read postgres plaintext passwords * added documentation for passlib.sqldb
* CryptPolicy workEli Collins2011-02-071-13/+82
| | | | | | | | ================ * (temporarily?) commented out frontend methods in toplevel passlib module * bugfixes to CryptPolicy * added min_verify_time to CryptPolicy * added default policy config file
* major work on policy systemEli Collins2011-02-041-200/+339
| | | | | | | | | | | | | | | | | =========================== * added documentation detailing policy system's keys and functionality * split policy-related code out of CryptContext into CryptPolicy object * added 'category' kwd to all relevant CryptContext methods * implemented parsing & introspection methods for CryptPolicy * added rounds management to CryptContext, per policy specification * attempt at documenting passlib.unix (incomplete) TODO ---- * ability to create composite CryptPolicy objects * per-hash handling of policy compliance checks * UTs for policy system
* encode transposed bytesEli Collins2011-02-041-1/+1
| | | | | | ======================= * replaced h64.encode_xxx_offsets() functions with h64.encode_transposed_bytes() and list of offsets * affects sha256-crypt, sha512-crypt, md5-crypt, sun-md5-crypt
* CryptContext workEli Collins2011-02-021-69/+51
| | | | | | ================= * fills in per-handler defaults from configuration * added genconfig() and genhash() passthrough methods
* updated docsEli Collins2011-01-311-3/+7
|
* tweak: passlib.hash module now used directly as storage location for all ↵Eli Collins2011-01-311-57/+36
| | | | registered handlers
* rearranged some modulesEli Collins2011-01-301-0/+559
|
* rearanging moreEli Collins2011-01-191-554/+0
| | | | | | | =============== * split passlib.base into passlib.context & passlib.handler * renamed CryptAlgorithm to CryptHandler (similar rename for support funcs, eg register_crypt_handler) * updated related imports
* beginning major rearrangementEli Collins2011-01-181-70/+55
| | | | | | | | | | | | | | | | | | | | | ============================= * changing basic alg protocol - setting_kwds attr which includes salt/rounds kwds - encrypt no longer accepts hash as input - encrypt now must accept setting_kwds (eg salt/rounds) as input - verify now throws error if hash missing / invalid - identify same as always - parse / render now optional inclusions - hash_bytes renamed to checksum_bytes - has_salt / has_rounds removed - added default_rounds / min_rounds / max_rounds attrs * added CryptAlgorithmHelper with some common helper routines - _norm_rounds(), applies default/min/max attrs to input - setting_kwds autocalculates if needed * added generate & validate salt helpers (replacing old ones) * replacing overengineered rng w/ simpler one (1/2 done) * NOTE: UTs need updating!!!
* bugfixes missing from last commitEli Collins2011-01-141-1/+2
|
* relocated passlib.hash.XXX to passlib.XXX; all UTs passEli Collins2011-01-141-0/+568