diff options
| author | Eli Collins <elic@assurancetechnologies.com> | 2013-04-10 14:09:46 -0400 |
|---|---|---|
| committer | Eli Collins <elic@assurancetechnologies.com> | 2013-04-10 14:09:46 -0400 |
| commit | 1fc43ec17f2b8e453283bcd9f0c3e8962703a15d (patch) | |
| tree | 0c576658fbcf15f219977f7e786060e72b114436 /admin | |
| parent | 3a1e9b9acb0662dad130d813473553a3233ede76 (diff) | |
| download | passlib-1fc43ec17f2b8e453283bcd9f0c3e8962703a15d.tar.gz | |
pbkdf cleanups
* updated sha1_crypt to use get_keyed_prf(), should be ~10% faster
* documented get_hash_info() and get_keyed_prf()
Diffstat (limited to 'admin')
| -rw-r--r-- | admin/benchmarks.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/admin/benchmarks.py b/admin/benchmarks.py index ff3480a..6d8db93 100644 --- a/admin/benchmarks.py +++ b/admin/benchmarks.py @@ -242,6 +242,16 @@ def test_phpass(): handler.verify(OTHER, hash) return helper +@benchmark.constructor() +def test_sha1_crypt(): + from passlib.hash import sha1_crypt as handler + kwds = dict(salt='.'*8, rounds=10000) + def helper(): + hash = handler.encrypt(SECRET, **kwds) + handler.verify(SECRET, hash) + handler.verify(OTHER, hash) + return helper + #============================================================================= # crypto utils #============================================================================= |
