diff options
-rw-r--r-- | cryptography/hazmat/primitives/hmac.py | 2 | ||||
-rw-r--r-- | docs/hazmat/primitives/hmac.rst | 2 | ||||
-rw-r--r-- | tests/hazmat/primitives/test_hmac.py | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/cryptography/hazmat/primitives/hmac.py b/cryptography/hazmat/primitives/hmac.py index c417cd2e..4da0cc3f 100644 --- a/cryptography/hazmat/primitives/hmac.py +++ b/cryptography/hazmat/primitives/hmac.py @@ -26,7 +26,7 @@ class HMAC(object): backend = _default_backend if digestmod is None: - raise ValueError("digestmod is a required argument") + raise TypeError("digestmod is a required argument") self._backend = backend self.digestmod = digestmod diff --git a/docs/hazmat/primitives/hmac.rst b/docs/hazmat/primitives/hmac.rst index 76b7e24c..14aaf19f 100644 --- a/docs/hazmat/primitives/hmac.rst +++ b/docs/hazmat/primitives/hmac.rst @@ -34,7 +34,7 @@ message. .. method:: update(msg) - :param bytes msg The bytes you wish to hash. + :param bytes msg: The bytes you wish to hash. .. method:: copy() diff --git a/tests/hazmat/primitives/test_hmac.py b/tests/hazmat/primitives/test_hmac.py index 81d9ac86..42726a7c 100644 --- a/tests/hazmat/primitives/test_hmac.py +++ b/tests/hazmat/primitives/test_hmac.py @@ -42,7 +42,7 @@ class TestHMAC(object): assert isinstance(h.hexdigest(), str) def test_hmac_no_digestmod(self): - with pytest.raises(ValueError): + with pytest.raises(TypeError): hmac.HMAC(key=b"shortkey") |