mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
Issue #26390: Fix and test pbkdf2_hmac() parameter names
Based on patch by Daan Bakker.
This commit is contained in:
parent
8c16cb9f65
commit
bc85e35fe6
2 changed files with 10 additions and 6 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue