diff options
| author | Eli Collins <elic@assurancetechnologies.com> | 2011-02-09 12:31:41 -0500 |
|---|---|---|
| committer | Eli Collins <elic@assurancetechnologies.com> | 2011-02-09 12:31:41 -0500 |
| commit | 15f6fe8633ceb47695e05ff1bc0d7b95db0e3075 (patch) | |
| tree | 67b8ca4c9939f010a45db80779ecdd1af2996155 /passlib | |
| parent | c646a54645e492f48f70c0a26ead71b51484d25c (diff) | |
| download | passlib-15f6fe8633ceb47695e05ff1bc0d7b95db0e3075.tar.gz | |
renamed rounds_cost constants to "linear" and "log2"
Diffstat (limited to 'passlib')
| -rw-r--r-- | passlib/hash/bcrypt.py | 2 | ||||
| -rw-r--r-- | passlib/hash/ext_des_crypt.py | 2 | ||||
| -rw-r--r-- | passlib/hash/phpass.py | 2 | ||||
| -rw-r--r-- | passlib/hash/sha256_crypt.py | 2 | ||||
| -rw-r--r-- | passlib/hash/sha512_crypt.py | 2 | ||||
| -rw-r--r-- | passlib/hash/sun_md5_crypt.py | 2 | ||||
| -rw-r--r-- | passlib/utils/__init__.py | 4 |
7 files changed, 8 insertions, 8 deletions
diff --git a/passlib/hash/bcrypt.py b/passlib/hash/bcrypt.py index 1b0ad85..d1825d2 100644 --- a/passlib/hash/bcrypt.py +++ b/passlib/hash/bcrypt.py @@ -75,7 +75,7 @@ default_rounds = 12 #current passlib default min_rounds = 4 # bcrypt spec specified minimum max_rounds = 31 # 32-bit integer limit (real_rounds=1<<rounds) -rounds_cost = "2**r" +rounds_cost = "log2" #========================================================= #internal helpers diff --git a/passlib/hash/ext_des_crypt.py b/passlib/hash/ext_des_crypt.py index e482e73..ebc1cfe 100644 --- a/passlib/hash/ext_des_crypt.py +++ b/passlib/hash/ext_des_crypt.py @@ -74,7 +74,7 @@ default_rounds = 10000 min_rounds = 0 #NOTE: some sources (OpenBSD login.conf) report 7250 as minimum allowed rounds max_rounds = 16777215 # (1<<24)-1 -rounds_cost = "r" +rounds_cost = "linear" #========================================================= #internal helpers diff --git a/passlib/hash/phpass.py b/passlib/hash/phpass.py index 42c030b..a771758 100644 --- a/passlib/hash/phpass.py +++ b/passlib/hash/phpass.py @@ -41,7 +41,7 @@ default_rounds = 9 min_rounds = 7 max_rounds = 30 -rounds_cost = "2^r" +rounds_cost = "log2" #========================================================= #internal helpers diff --git a/passlib/hash/sha256_crypt.py b/passlib/hash/sha256_crypt.py index 9c0ab8a..a7cd1fd 100644 --- a/passlib/hash/sha256_crypt.py +++ b/passlib/hash/sha256_crypt.py @@ -202,7 +202,7 @@ context_kwds = () default_rounds = 40000 #current passlib default min_rounds = 1000 max_rounds = 999999999 -rounds_cost = "r" +rounds_cost = "linear" min_salt_chars = 0 max_salt_chars = 16 diff --git a/passlib/hash/sha512_crypt.py b/passlib/hash/sha512_crypt.py index a4263dd..6ea50c5 100644 --- a/passlib/hash/sha512_crypt.py +++ b/passlib/hash/sha512_crypt.py @@ -101,7 +101,7 @@ max_salt_chars = 16 default_rounds = 40000 #current passlib default min_rounds = 1000 max_rounds = 999999999 -rounds_cost = "r" +rounds_cost = "linear" #========================================================= #internal helpers diff --git a/passlib/hash/sun_md5_crypt.py b/passlib/hash/sun_md5_crypt.py index 470d96a..352a344 100644 --- a/passlib/hash/sun_md5_crypt.py +++ b/passlib/hash/sun_md5_crypt.py @@ -201,7 +201,7 @@ default_rounds = 5000 #current passlib default min_rounds = 0 max_rounds = 4294963199 ##2**32-1-4096 #XXX: not sure what it does if past this bound... does 32 int roll over? -rounds_cost = "r" +rounds_cost = "linear" #========================================================= #internal helpers diff --git a/passlib/utils/__init__.py b/passlib/utils/__init__.py index 1190c60..33fcdeb 100644 --- a/passlib/utils/__init__.py +++ b/passlib/utils/__init__.py @@ -447,8 +447,8 @@ def autodocument(scope, salt_charset="[./0-9A-Za-z]", context_doc=''): min_rounds = scope['min_rounds'] max_rounds = scope['max_rounds'] rounds_cost = scope['rounds_cost'] - assert rounds_cost in ("r","2**r") - log_rounds = (rounds_cost == "2**r") + assert rounds_cost in ("linear","log2") + log_rounds = (rounds_cost == "log2") context_kwds = scope['context_kwds'] |
