diff options
author | Michaël Ball <michael.ball@gmail.com> | 2014-12-28 12:24:22 +0000 |
---|---|---|
committer | Michaël Ball <michael.ball@gmail.com> | 2015-11-27 20:02:04 +0000 |
commit | 75beec91a8526fbbc0a90134140b9dff6af15c0c (patch) | |
tree | 02414e46da3e08000384c40c27b7aab9748de0fe /common/security.py | |
parent | a2964845e3c03b9cf5f01583f53f7553c7d67caf (diff) |
Initial frontend work
Diffstat (limited to 'common/security.py')
-rw-r--r-- | common/security.py | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/common/security.py b/common/security.py new file mode 100644 index 0000000..af1e8b9 --- /dev/null +++ b/common/security.py @@ -0,0 +1,15 @@ +from passlib.context import CryptContext + + +pwd_context = CryptContext( + schemes=["pbkdf2_sha256", "des_crypt"], + default="pbkdf2_sha256", + + # vary rounds parameter randomly when creating new hashes... + all__vary_rounds=0.1, + + # set the number of rounds that should be used... + # (appropriate values may vary for different schemes, + # and the amount of time you wish it to take) + pbkdf2_sha256__default_rounds=8000, + ) |