diff options
author | Eli Collins <elic@assurancetechnologies.com> | 2017-01-30 13:02:52 -0500 |
---|---|---|
committer | Eli Collins <elic@assurancetechnologies.com> | 2017-01-30 13:02:52 -0500 |
commit | c05911aaca38d8c488c4dc0c878ddeddf9ea0b2d (patch) | |
tree | d5500cc488a26cfc1820512bf1c7ef948c5589b7 /passlib/exc.py | |
parent | 547545395959779c33a2bd2927d998bcde6781d0 (diff) | |
download | passlib-c05911aaca38d8c488c4dc0c878ddeddf9ea0b2d.tar.gz |
PasswordHash: hammered out more of password truncation policy.
PasswordHash
-------------
* .truncate_size now used to indicate general "max password size";
* .truncate_error now defined for all hashers, indicates .hash() policy
* added .truncate_verify_reject as companion, indicates corresponding .verify() policy.
HandlerTestCase
---------------
* expanded test functions to check all combinations of truncation policy flags
* fixed fuzzer so it doesn't generate passwords which would throw PasswordSizeError.
Diffstat (limited to 'passlib/exc.py')
-rw-r--r-- | passlib/exc.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/passlib/exc.py b/passlib/exc.py index 95a0707..c4b78b4 100644 --- a/passlib/exc.py +++ b/passlib/exc.py @@ -28,8 +28,10 @@ class MissingBackendError(RuntimeError): """ class PasswordSizeError(ValueError): - """Error raised if a password exceeds the maximum size allowed - by Passlib (4096 characters). + """ + Error raised if a password exceeds the maximum size allowed + by Passlib (by default, 4096 characters); or if password exceeds + a hash-specific size limitation. Many password hash algorithms take proportionately larger amounts of time and/or memory depending on the size of the password provided. This could present |