diff options
author | Martin Panter <vadmium+py@gmail.com> | 2016-02-22 09:21:49 (GMT) |
---|---|---|
committer | Martin Panter <vadmium+py@gmail.com> | 2016-02-22 09:21:49 (GMT) |
commit | bc85e35fe66edf18c7998d98bfa5682a9cbb0269 (patch) | |
tree | 7679728da2bddfd67ef21757a1b0bdcb9c28239d /Lib | |
parent | 8c16cb9f65bfc7d732bc6bd3f533856795a95690 (diff) | |
download | cpython-bc85e35fe66edf18c7998d98bfa5682a9cbb0269.zip cpython-bc85e35fe66edf18c7998d98bfa5682a9cbb0269.tar.gz cpython-bc85e35fe66edf18c7998d98bfa5682a9cbb0269.tar.bz2 |
Issue #26390: Fix and test pbkdf2_hmac() parameter names
Based on patch by Daan Bakker.
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/test/test_hashlib.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Lib/test/test_hashlib.py b/Lib/test/test_hashlib.py index 85ec2f9..8a297dd 100644 --- a/Lib/test/test_hashlib.py +++ b/Lib/test/test_hashlib.py @@ -513,6 +513,9 @@ class KDFTests(unittest.TestCase): self.assertRaises(ValueError, pbkdf2, 'sha1', b'pass', b'salt', 1, -1) with self.assertRaisesRegex(ValueError, 'unsupported hash type'): pbkdf2('unknown', b'pass', b'salt', 1) + out = pbkdf2(hash_name='sha1', password=b'password', salt=b'salt', + iterations=1, dklen=None) + self.assertEqual(out, self.pbkdf2_results['sha1'][0][0]) def test_pbkdf2_hmac_py(self): self._test_pbkdf2_hmac(py_hashlib.pbkdf2_hmac) |