diff options
| author | Eli Collins <elic@astllc.org> | 2011-03-25 12:11:17 -0400 |
|---|---|---|
| committer | Eli Collins <elic@astllc.org> | 2011-03-25 12:11:17 -0400 |
| commit | 32773d53f07bd9e94d4966a28f48c56cdecd51c3 (patch) | |
| tree | 59f64c35fb6c4b3255882a417b9a4462c40cac8f /passlib/apps.py | |
| parent | 771a8d2c0f909c6e8a59ff39ee4a1e939d799ce9 (diff) | |
| download | passlib-32773d53f07bd9e94d4966a28f48c56cdecd51c3.tar.gz | |
misc bugfixes & tweaks for win32 compat
Diffstat (limited to 'passlib/apps.py')
| -rw-r--r-- | passlib/apps.py | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/passlib/apps.py b/passlib/apps.py index 5b84963..ed91f2f 100644 --- a/passlib/apps.py +++ b/passlib/apps.py @@ -3,12 +3,12 @@ #imports #========================================================= #core -import platform import logging; log = logging.getLogger(__name__) #site #libs from passlib import hash from passlib.context import CryptContext +from passlib.utils import sys_bits #pkg #local __all__ = [ @@ -23,8 +23,6 @@ __all__ = [ #========================================================= #for quickly bootstrapping new custom applications #========================================================= -_is32 = platform.architecture()[0] == '32bit' - custom_app_context = CryptContext( #choose some reasonbly strong schemes schemes=["sha512_crypt", "sha256_crypt"], @@ -32,7 +30,7 @@ custom_app_context = CryptContext( #set some useful global options min_verify_time = .125, all__vary_rounds = "10%", - default="sha256_crypt" if _is32 else "sha512_crypt", + default="sha256_crypt" if sys_bits < 64 else "sha512_crypt", #set a good starting point for rounds selection sha512_crypt__default_rounds = 40000, |
