diff options
Diffstat (limited to 'admin/benchmarks.py')
| -rw-r--r-- | admin/benchmarks.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/admin/benchmarks.py b/admin/benchmarks.py index 1a01951..3a980c0 100644 --- a/admin/benchmarks.py +++ b/admin/benchmarks.py @@ -283,17 +283,17 @@ def test_sha1_crypt(): #============================================================================= @benchmark.constructor() def test_pbkdf2_sha1(): - from passlib.utils.pbkdf2 import pbkdf2 + from passlib.crypto.digest import pbkdf2_hmac def helper(): - result = hexlify(pbkdf2("abracadabra", "open sesame", 10240, 20, "hmac-sha1")) + result = hexlify(pbkdf2_hmac("sha1", "abracadabra", "open sesame", 10240, 20)) assert result == 'e45ce658e79b16107a418ad4634836f5f0601ad1', result return helper @benchmark.constructor() def test_pbkdf2_sha256(): - from passlib.utils.pbkdf2 import pbkdf2 + from passlib.crypto.digest import pbkdf2_hmac def helper(): - result = hexlify(pbkdf2("abracadabra", "open sesame", 10240, 32, "hmac-sha256")) + result = hexlify(pbkdf2_hmac("sha256", "abracadabra", "open sesame", 10240, 32)) assert result == 'fadef97054306c93c55213cd57111d6c0791735dcdde8ac32f9f934b49c5af1e', result return helper |
