mirror of https://github.com/django/django.git
Added a test for pbkdf2()'s default digest algorithm.
This commit is contained in:
parent
c7e9e22695
commit
8ddbe01760
|
@ -140,3 +140,7 @@ class TestUtilsCryptoPBKDF2(unittest.TestCase):
|
|||
result = pbkdf2(**vector['args'])
|
||||
self.assertEqual(binascii.hexlify(result).decode('ascii'),
|
||||
vector['result'])
|
||||
|
||||
def test_default_hmac_alg(self):
|
||||
kwargs = {'password': b'password', 'salt': b'salt', 'iterations': 1, 'dklen': 20}
|
||||
self.assertEqual(pbkdf2(**kwargs), hashlib.pbkdf2_hmac(hash_name=hashlib.sha256().name, **kwargs))
|
||||
|
|
Loading…
Reference in New Issue