| Commit message (Collapse) | Author | Age | Files | Lines |
| | |
|
| |
|
|
| |
.set_backend() return value.
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* scrypt kdf code
- relocated scrypt kdf code to passlib.crypto.scrypt
- py3 compat fixes
- split UTs out into separate file
- removed "non-power of 2" support, not needed.
- added wrapper which can toggle between builtin backend,
and extenrnal scrypt package.
- factored out n/r/p validation code so it can be used independantly
of calling kdf itself.
* passlib.handlers.scrypt: added scrypt handler which wraps the kdf.
- added some custom test strings, as well as adapted some reference values
from the scrypt whitepaper.
- added documentation page
- integrated scrypt kdf wrapper w/ hash's HasManyBackends api
|
| |\ |
|
| | | |
|
| | | |
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
as a fallback for 'default_rounds', 'min_rounds', and 'max_rounds'.
this makes it easier to specify a django-style policy of "deprecate all hashes
which have a differing rounds value".
* removed special handling from 'rounds' from CryptContext parser
* tweaked affected CryptContext serialization tests
* added test for new behavior
|
| | | |
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
implementation
these all derived directly from PasswordHash, and lacked a working .using().
* added UT to check for a working .using() method
* factored out GenericHandler's .using() into another base class
which these three hashes could inherit from.
|
| | |
| |
| |
| | |
to tox.ini
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
only legitimate use was for 'vary_rounds' option, which is being phased out,
and other uses like 'min_rounds' were a security issue.
* fixed CryptContext() tests to stop uses "all" kwds
* issue dep warning if "all" scheme is used
* issue config warning if anything but "vary_rounds" is used,
since config needs to be changed (regardless of passlib version)
|
| | |
| |
| |
| |
| |
| |
| | |
and not worth the amount of code it requires to support it.
* stripped out vary_rounds from all internal presets
* added deprecation warning if it's ever used
|
| | |
| |
| |
| |
| | |
removed _CryptRecord proxy object completely. CryptContext now just
worked with custom handler instances directly.
|
| | |
| |
| |
| | |
default salt size, added UTs.
|
| | |
| |
| |
| | |
prevents some spurious test failures when under erratic system load
|
| | |
| |
| |
| | |
'cryptography' package
|
| | | |
|
| | |
| |
| |
| |
| |
| |
| |
| |
| | |
* HasRounds: now parses vary_rounds="0.x" format correctly
* PrefixWrapper: now exposes "vary_rounds" attr
* handler tests: split HasRounds.using() into multiple tests, one for each property
(max_rounds, min_rounds, etc)
* context tests: added checks that custom handler is being configured correctly,
since actual behavior is now being checked by handler tests.
|
| | | |
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
.encrypt()
----------
hash.encrypt() & context.encrypt() have been renamed to .hash().
this should take care of the long-standing issue 21 (the poor naming of .encrypt).
per docs, legacy aliases will remain in place until passlib 2.0.
.genhash() / .genconfig()
-------------------------
taking advantage of this reorganization to also deprecate .genconfig()
and .genhash() -- they're not really useful in a modern system,
nor as needed for historical support as initially thought:
.genconfig() will be retired completely in passlib 2.0;
.genhash() is rolled into the new .hash() method along with .encrypt().
|
| | | |
|
| | | |
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* split generate() into genword() & genphrase() --
APIs are just too different to keep combined.
* renamed internal calc funcs to better reflect their purpose.
* commented out PhraseGenerator's min_chars code, can't confirm
it's doing correct thing.
* commented out password strength estimator, too half-baked.
* tried to simplify SequenceGenerator attributes.
* genword(): defined some base charsets to work with
* genphrase(): wordsets now stored uncompressed (not really that big,
and .whl will compress everything for transport).
* fleshed out UTs for genword() & genphrase()
* updated docs
|
| | | |
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
and moved them to a separate passlib.crypto subpackage.
along with this move, made a few api cleanups:
* unified all code that's looking up hashes
to use new passlib.crypto.lookup_hash() wrapper, which takes
care of hash name normalization, loading fallback implementations,
and alg metadata inspection, all hidden behind a memoized function.
* deprecated pbkdf2() in favor of pbkdf2_hmac() -- only real use,
and new signature matches stdlib function. additionally,
this version is a bit faster, due to some assumptions that
can be made due to the PRF always being HMAC based.
* added compile_hmac() helper which does an even more efficient
job of pre-compiling a keyed HMAC function; this helped speed up pbkdf2 a bit more.
|
| | | |
|
| | |
| |
| |
| | |
don't use 0, even if "allowed" by hash, causes spurious failures.
|
| | |
| |
| |
| |
| |
| |
| |
| |
| | |
announcement
motivation is that django hashers framework has matured greatly
as of django 1.8, and dropping all prior versions not only eases support burden,
but opens up opportunity for integration via less invasive method in a
future passlib release, using django 1.8 as a common base.
|
| | |\ |
|
| | | | |
|
| | | |
| | |
| | |
| | | |
handlers.
|
| | | |
| | |
| | |
| | | |
(grafted from 147ca054691e1cc798faec622d8509502d7c37f9)
|
| | | |
| | |
| | |
| | | |
(grafted from da9beaf8d08dc0139430124ea1cf494242f14f5c)
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
failures were mostly in the unittests, not in passlib proper.
however, to get things working, ended up making some internal improvements
to django integration.
* passlib.ext.django now patches get_hashers() for django 1.8+
* the (still internal) _PasslibHasherWrapper, which wraps a passlib hash
in a django-hasher-compatible api, got an overhaul:
- 'rounds' and 'iterations' attributes now populated from underlying
passlib hasher, so inspecting them gives sane result.
- now autohandles 'rounds' vs 'iterations' to match expected django api.
- bugfix: correct OrderedDict import removed in django 1.9
- .must_update() now mimics django's semantics, using wrapped handler.parse_rounds().
previously just always returned False.
- NOTE: all these changes bring this thing much closer to be able to provide
passlib handlers TO django, rather than having to patch entire django framework.
* unittests
- django 1.7+: populate django apps before test; required as of 1.9
- added rounds settings required for 1.9 test to function
- django tests integratio - now keeps context in sync
for all hashers, not just pbkdf2_sha256; needed to pass some django 1.9 tests.
* django 1.8 is LTS, and <= 1.7 is EOLed, per https://www.djangoproject.com/download/;
so now planning to drop django 1.6 / 1.7 support in passlib 1.7.
|
| | | |
| | |
| | |
| | | |
which abstracts out job of parsing rounds value from hash.
|
| | | |
| | |
| | |
| | |
| | |
| | | |
the context,
and they will only be passed on for the hashes that support them (fixes issue 63).
|
| | |\ \
| | | |
| | | |
| | | |
| | | |
| | | | |
request #2)
Fix typo
|
| | | | | |
|
| | |/ / |
|
| | | | |
|
| | |\ \
| | |/ |
|
| | | | |
|
| | | | |
|
| | | | |
|
| | | | |
|
| | | |
| | |
| | |
| | |
| | |
| | | |
under py25
(fixes issue 58)
|
| | | | |
|
| | | | |
|
| | | | |
|